ITeye博客

RHEL常用命令

iffiffj · 2012-01-09 11:19 · 操作系统 · Markdown

系统重要目录和文件:


网络配置:/etc/sysconfig/network-scripts/
SELinux:/etc/sysconfig/selinux
HostName:/etc/sysconfig/network
服务脚本:/etc/init.d/
系统默认启动界面:/etc/inittab
系统调度:/etc/crontab
CPU信息:/proc/cpuinfo
内存信息:/proc/meminfo
系统版本:/etc/system-release

查看进程打开的文件数:

lsof -p pid|wc -l

修改最大打开文件数(too many open files):


ulimit -u 查看open files设置
ulimit -a 查看所有设置
ulimit -u 65535(新的open files 值)修改设置
ulimit -n 65536 设置用户可以同时打开的最大文件数(max open files

查看修改网卡工作模式(全双工/半双工):


ethtool eth0

SELinux的开启和关闭:


getenforce
setenforce [ enforcing | permissive | 1 | 0 ]

设置系统语言:

export LANG=en_US.UTF-8

系统自启动服务:


chkconfig [--list] [--type <type>] [name]
chkconfig --add <name>
chkconfig --del <name>
chkconfig --override <name>
chkconfig [--level <levels>] [--type <type>] <name> <on|off|reset|resetpriorities>

启动系统服务:


service < option > | --status-all | [ service_name [ command | --full-restart ] ]
service servicename start | stop | restart | status

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。