正在加载……
Linux查看系统命令
| |
Posted in LAMP on August 1, 2006 / 引用(0)

1. 系统/文件/网络
df -lh 查看磁盘的使用情况以及文件系统被挂载的位置
fdisk -l 查看磁盘分区表及分区结构
stat  display file or filesystem status
uname                                 "什么系统",-r "查看内核版本"
du                                       "查看文件占用空间"
dmesg                                       "系统信息"
netstat                               "由于参数众多,不一一详细写,端口信息"

2. 用户
w Show who is logged on and what they are doing.
useradd username "添加用户" -G 组名 username "直接将用户加到组并创建"
userdel username "删除用户" -r username "连用户的目录也删除"
passwd username "添加密码"
passwd -l username "锁密码"
passwd -u username "解开密码"
passwd -d username "删除密码"
id username "查看用户信息"
usermod -l new_username old_username "用户改名"
usermod -G 组名 username "更改组"
usermod -L username "锁顶用户"
usermod -U username "激活用户"
groupadd 组名 "创建组"
gpassswd -a username 组名 "将用户添加到组"
groupmod -n new_group old_group "组改名"
groupdel 组名 "删除组"
gpasswd 组名 "改变组密码"
gpasswd -r 组名 "删除组密码"

This entry comes from 本站原创 and has been read for 294 times.It is tagged with .
发表评论

昵称

网址

电邮

OpenID登入 高级选项 表情