Linux查看系统配置常用命令
系统
# uname -a # 查看内核/操作系统/CPU信息
# head -n 1 /etc/issue # 查看操作系统
版本
# cat /proc/cpuinfo # 查看CPU信息
# hostname # 查看计算机名
# lspci -tv # 列出所有PCI设备
# lsusb -tv # 列出所有USB设备
# lsmod # 列出加载的内核模块
# env # 查看环境变量
资源
# free -m # 查看内存使用量和交换区使用量
# df -h # 查看各分区使用情况
# du -sh <目录名> # 查看指定目录的大小
# grep MemTotal /proc/meminfo # 查看内存总量
# grep MemFree /proc/meminfo # 查看空闲内存量
# uptime # 查看系统运行时间、用户数、负载
# cat /proc/loadavg # 查看系统负载
磁盘和分区
# mount | column -t # 查看挂接的分区状态
# fdisk -l # 查看所有分区
# swapon -s # 查看所有交换分区
# hdparm -i /dev/hda # 查看磁盘参数(仅适用于IDE设备)
# dmesg | grep IDE # 查看启动时IDE设备检测状况
相关文档:
1. Technically speaking, and in this book, the operating
system
is considered the parts of the system responsible for basic use
and administration. This includes the kernel and device drivers, boot loader,
command shell or other user interface, and basic file and system utilities ......
只要看看 include/linux/init.h中的定义就清楚了:
#define core_initcall(fn) __define_initcall("1",fn)
#define postcore_initcall(fn) __define_initcall("2",fn)
#define arch_initcall(fn) &n ......
根据MAN帮助翻译的,不知道准不准确:
D 不可中断的休眠进程(一般为 IO相关的)
R 正在运行的或将运行的(在运行队列中)
S 忆中断的休眠进 ......
一.填空题:
1. 在Linux系统中,以文件方式访问设备 。
2. Linux内核引导时,从文件/etc/fstab中读取要加载的文件系统。
3. Linux文件系统中每个文件用i节点来标识。
4. 全部磁盘块由四个部分组成,分别为引导块 、专用块 、 i节点表块 和数据存储块。
5. 链接分为:硬链接 和 符号链接。
6. 超级块包含了i节点表 ......
在linux中userid和usergroup分别存于 /etc/group, /etc/shadow, /etc/passwd
在group 中可以修改sudo group和admin权限
远程登陆设置在 /etc/ssh/ssh-config 和 /etc/ssh/sshd-config里,重设后 /etc/init.d/ssh restart
在webmin中更改了firewall后必须重启网络 : /etc/init.d/networking restart
In Ubuntu, remote d ......