【命令名称】chsh
【使用权限】所有人
【命令语法】chsh [-ls]
【功能说明】更换shell
【常用参数】l   列出当前系统上shell
            s   设置shell
【命令实例】
1,更换shell
[cxc@cxcserver ~]$ sudo chsh -l
[sudo] password for cxc:
/bin/sh
/bin/bash
/sbin/nologin
[cxc@cxcserver ~]$ chsh -s /bin/sh
Changing shell for cxc.
Password:
Shell changed.
[cxc@cxcserver ~]$ grep cxc /etc/passwd
cxc:x:500:500::/home/cxc:/bin/sh
[cxc@cxcserver ~]$ chsh -s /bin/bash
Changing shell for cxc.
Password:
Shell changed.
[cxc@cxcserver ~]$ grep cxc /etc/passwd
cxc:x:500:500::/home/cxc:/bin/bash
[cxc@cxcserver ~]$
 
 
 
【命令名称】dmesg
【使用权限】root
【命令语法】demsg [c]
【功能说明】分析内核产生的信息
【常用参数】c 在打印出来后清除内核信息
【命令实例】
1.显示内核信息
[cxc@cxcserver ~]$ dmesg
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 2.6.32-279.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Jun 22 12:19:21 UTC 2012
Command line: ro root=UUID=98d3c7a3-7c1c-472e-8883-2d3b63f6400f rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
KERNEL supported cpus:
 Intel GenuineIntel
 AMD AuthenticAMD
 Centaur CentaurHauls
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
 BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000007f5e0000 (usable)
 BIOS-e820: 000000007f5e0000 - 000000007f5e3000 (ACPI NVS)
 BIOS-e820: 000000007f5e3000 - 000000007f5f0000 (ACPI data)
 BIOS-e820: 000000007f5f0000 - 000000007f600000 (reserved)
…………………………以后省略……………………………………………………………
 
2.在dmesg查找网卡信息
[cxc@cxcserver ~]$ dmesg |grep eth
r8169 0000:02:00.0: eth0: RTL8102e at 0xffffc9001097e000, 00:24:1d:92:f3:c5, XID 14a00000 IRQ 28
r8169 0000:02:00.0: eth0: link down
r8169 0000:02:00.0: eth0: link down
ADDRCONF(NETDEV_UP): eth0: link is not ready
r8169 0000:02:00.0: eth0: link up
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
eth0: no IPv6 routers present
[cxc@cxcserver ~]$