修改 Linux 主机名
Linux 下什么都比较麻烦,就连修改主机名也不例外。
Linux 安装好后,其默认的主机名是 localhost。修改 Linux 主机名需要3步。
使用 hostname 修改当前主机名。
hostname new-hostname
修改 /etc/sysconfig/network 配置文件,以便下次重启的时,使用新的主机名。
打开 /etc/sysconfig/network 文件,修改 HOSTNAME=new-hostname.domainname。
修改后的 /etc/sysconfig/network 文件如下:
NETWORKING=yes
HOSTNAME=new-hostname.localdomain
修改本机的域名解析文件 /etc/hosts ,使得本机的应用程序能够解析新的主机名。
编辑文件: /etc/hosts
修改: xxx.xxx.xxx.xxx new-hostname.domainname new-hostname
(这里的xxx代表本机的网络地址,也可以是环回地址127.0.0.1)
修改后的 /etc/hosts 文件如下:
127.0.0.1 localhost.localdomain localhost
127.0.0.1 new-hostname.localdomain new-hostname
相关文档:
在开发一个系统时,一般是将一个系统分成几个模块,这样做提高了系统的可维护性,但由于各个模块间不可避免存在关联,所以当一个模块改动后,其他模块也许会有所更新,当然对小系统来说,手工编译连接是没问题,但是如果是一个大系统,存在很多个模块,那么手工编译的方法就不适用了。为此,在Linux系统中,专门提供了一个m ......
Platform and tools: Ubuntu 9.04
Step 1, Download the nios linux tallbal
wget http://www.niosftp.com/pub/linux/nios2-linux-20090929.tar
or use xunlei to fix it.
Step2,
tar xvf nios2-linux-20090929.tar
cd nios2-linux
./checkout
Step 3, Generate the fpga.h f ......
1、使用GTK中的GdkEvent
GdkEvent *event;
event = gdk_event_new (GDK_KEY_PRESS); //按键按下
event->key.send_event = TRUE;
event->key.keyva ......
简单实例说明待补充,实例源码可在此链接下载http://d.download.csdn.net/down/2389895/sanlinux
jniNative.cpp
#include "jniNative.h"
#include "mymain.h"
#include <stdio.h>
JNIEXPORT void JNICALL Java_HelloWorld_print(JNIEnv *env, jobject arg, jstring instring)
{
&nb ......
现象描述:
最近装了虚拟机系统是 fedora9,为了以后使用方便对虚拟机进行克隆或复制。当使用克隆后的虚拟机时发现原来在基本系统中的网卡eth0到了新系统却没有了,使用ifconfig -a会发现只有eth1。因为基本系统的网络相关配置都是基于eth0的,eth1没有网络相关的配置,此 ......