如何改变Linux主机名
How to change the hostname of a Linux system
Normally we will set the hostname of a system during the installation process. Many peoples don’t care about this, and don’t change the hostname even if for example this was set to something really stupid by the datacenter that installed the system (most likely they will set this to “debian” on any debian installation, etc). For me, it is important to see on each one of the ssh screens I will have open at any time a different hostname that is relevant and will give me quickly the information on what system I am logged in.
Change the hostname on a running system
On any Linux system you can change its hostname with the command ‘hostname‘ (surprised?)… Here are some quick usages of the command line hostname:
hostname
without any parameter it will output the current hostname of the system.
hostname --fqd
it will output the fully qualified domain name (or FQDN) of the system.
hostname NEW_NAME
will set the hostname of the system to NEW_NAME. This is active right away and will remain like that until the system will be rebooted (because at system boot it will set this from some particular file configurations – see bellow how to set this permanently). You will most probably need to exit the current shell in order to see the change in your shell prompt.
Permanent hostname change on Debian based systems
Debian based systems use the file /etc/hostname to read the hostname of the system at boot time and set it up using the init script /etc/init.d/hostname.sh
/etc/hostname
server
So on a Debian based system we can edit the file /etc/hostname and change the name of the system and then run:
/etc/init.d/hostname.sh start
to make the change active. The hostname saved in this file (/etc/hostname) will be preserved on system reboot (and will be set using the same script we used hostname.sh).
Permanent hostname change on RedHat based systems
RedHat based system use the file
相关文档:
关键字: shell
转自:http://fanqiang.chinaunix.net/program/code/2006-06-27/4695.shtml
Ruby代码
删除 core 文件
# find ~ -name core -exec file {} \; -exec rm -i {} \;
&nbs ......
默认:
httpd.conf 在/etc/httpd/conf
my.cnf 在/etc
php.ini 在/usr/local/lib
在Unix 上,php.ini文件缺省放在/usr/local/lib上面,因为缺省的存放路径是<install-path>
/lib,但是可以在编译的时候使用--with-config-file-path参数来修改php.ini的存放位置,例如你可以使用--with-
config-file-path ......
/ 根目录
│
├boot/ Linux的内核及系统引导程序所需要的文件目录
│ └grub/ Grub引导器相关的文件
│
&n ......
route add -net 10.10.101.0 netmask 255.255.255.0 gw 10.10.100.1
cat route-eth0
10.10.101.0/24 via 10.10.100.1 dev eth0
/etc/rc.d/init.d/network restart
netstat -r
[root@1314it network-scripts]# cat /etc/sysconfig/network-scripts/route-eth0
123.123.123.0 via 156.156.156.156 de ......
前提:
1. 下载ubuntu并安装
2. 知道常用的linux命令
3. 能看英文
摘要:
对新手来说
,驱动就是一个程序,通过调用注册函数和修改makefile使linux内核能加载它,于是它在接受操作的时候能有点反应;其与应用程序的主要区别在于其权限高,跑在kernel space里。
开动:
* 下载《Linux Device Drivers 3rd Edition》
......