腊月的季节

linux命令总结(二)

linux用户操作

useradd test添加test用户
passwd test 添加test密码
userdel -r test删除test用户
su root 转到root用户
whereis 字符串
whois

linux网络管理

ifconfig -a 显示网络所有信息
/etc/modprobe.conf 网络配置文件
ifconfig eth0 192.168.83.126设置网卡ip地址
route add default gw 192.168.83.1设置默认网关
ifconfig eth0 down 关闭网卡
ifconfig eth0 up 启用网卡

linux系统操作

shutdown -h now 关机
shutdown -r now 重启

linux重定义命令

alias dir=’ls’

linux下载

wget http://www.lzhword.cn/sq.zip
wget -t http://www.lzhword.cn/sq.zip
wget –limit-rate=123kb http://www.lzhword.cn/sq.zip
rpm 程序名 程序安装
apt-get 程序名 程序安装
yum 程序名 程序安装

linux解压缩

tar -c 创建新的归档文件
tar -t,–list 列出归档文件内容目录
tar -r,–append 将文件附加到归档文件之后
tar -u,–update 只附加比归档中新的文件
tar -x,–extract,–get 从归档文件中解析文件
tar -czf 压缩
tar -xzf 解压

热评文章