【掌握Ubuntu,轻松上手】必学50个系统常用命令攻略
日期:
最佳答案
1. 安装与登录命令
1.1 login
- 功能:登录Linux体系
- 用法:
login [username]
1.2 shutdown
- 功能:封闭或重启体系
- 用法:
shutdown [options] [time] [message]
1.3 halt
- 功能:结束体系运转
- 用法:
halt [options]
1.4 reboot
- 功能:重启打算机
- 用法:
reboot [options]
1.5 install
- 功能:安装软件包
- 用法:
sudo apt-get install package-name
1.6 mount
- 功能:挂载文件体系
- 用法:
mount [options] [source] [target]
1.7 umount
- 功能:卸载已挂载的文件体系
- 用法:
umount [options] [target]
1.8 chsh
- 功能:变动用户的默许Shell
- 用法:
chsh [options] [username]
1.9 exit
1.10 last
- 功能:表现近来的登录记录
- 用法:
last [options]
2. 文件处理命令
2.1 file
- 功能:辨认文件范例
- 用法:
file [options] [file]
2.2 mkdir
- 功能:创建目录
- 用法:
mkdir [options] [directory]
2.3 grep
- 功能:在文件中查抄特定形式的行
- 用法:
grep [options] [pattern] [file]
2.4 dd
- 功能:数据转换跟复制东西
- 用法:
dd [options] [source] [destination]
2.5 find
- 功能:在文件体系中查找文件
- 用法:
find [options] [path] [expression]
2.6 mv
- 功能:挪动或重命名文件跟目录
- 用法:
mv [options] [source] [destination]
2.7 ls
- 功能:列出目录内容
- 用法:
ls [options] [path]
2.8 diff
- 功能:比较文件或目录差别
- 用法:
diff [options] [file1] [file2]
2.9 cat
- 功能:兼并并表现文件内容
- 用法:
cat [options] [file]
2.10 ln
- 功能:创建链接文件
- 用法:
ln [options] [source] [link-name]
3. 体系管理相干命令
3.1 df
- 功能:表现磁盘空间利用情况
- 用法:
df [options] [path]
3.2 top
- 功能:及时检查体系资本利用情况
- 用法:
top [options]
3.3 free
- 功能:检查内存利用情况
- 用法:
free [options]
3.4 quota
- 功能:检查跟设置磁盘配额
- 用法:
quota [options]
3.5 at
- 功能:安排任务
- 用法:
at [options] [time] [command]
3.6 lp
- 功能:打印行列管理
- 用法:
lp [options] [command]
3.7 adduser
- 功能:增加新用户
- 用法:
sudo adduser [username]
3.8 groupadd
- 功能:增加新组
- 用法:
sudo groupadd [groupname]
3.9 kill
- 功能:停止过程
- 用法:
kill [options] [pid]
3.10 crontab
- 功能:设置准时任务
- 用法:
crontab [options] [file]
4. 收集操纵命令
4.1 ifconfig
- 功能:设置收集接口
- 用法:
ifconfig [options] [interface]
4.2 ip
- 功能:收集设置跟诊断东西
- 用法:
ip [options] [command]
4.3 ping
- 功能:测试收集连通性
- 用法:
ping [options] [host]
4.4 netstat
- 功能:表现收集连接跟路由信息
- 用法:
netstat [options]
4.5 telnet
- 功能:远程登录
- 用法:
telnet [host] [port]
4.6 ftp
4.7 route
- 功能:路由设置
- 用法:
route [options]
4.8 rlogin
4.9 rcp
- 功能:远程文件复制
- 用法:
rcp [options] [source] [destination]
4.10 finger
- 功能:查询用户信息
- 用法:
finger [options] [username]
4.11 mail
- 功能:发送邮件
- 用法:
mail [options] [recipient]
4.12 nslookup
- 功能:域名查询
- 用法:
nslookup [domain]
5. 体系保险相干命令
5.1 passwd
- 功能:修改密码
- 用法:
passwd [options] [username]
5.2 su
- 功能:切换用户权限
- 用法:
su [options] [username]
5.3 umask
- 功能:设置文件权限掩码
- 用法:
umask [options]
5.4 chgrp
- 功能:修改文件或目录所属组
- 用法:
chgrp [options] [group] [file]
5.5 chmod
- 功能:修改文件或目录权限
- 用法:
chmod [options] [mode] [file]
5.6 chown
- 功能:修改文件或目录全部者
- 用法:
chown [options] [owner] [file]
5.7 chattr
- 功能:设置文件或目录属性
- 用法:
chattr [options] [attribute] [file]
5.8 sudo
- 功能:以超级用户权限履行命令
- 用法:
sudo [command]
5.9 ps
- 功能:表现过程列表
- 用法:
ps [options]
5.10 who
- 功能:表现以后登录用户
- 用法:
who [options]
6. 其他命令
6.1 tar
- 功能:打包跟解压文件
- 用法:
tar [options] [file]
6.2 unzip
- 功能:解压ZIP文件
- 用法:
unzip [options] [file]
6.3 gunzip
- 功能:解压GZIP文件
- 用法:
gunzip [options] [file]
6.4 unrar
- 功能:解压RAR文件
- 用法:
unrar [options] [file]
6.5 mtools
- 功能:磁带设备处理东西
- 用法:
mtools [command]
6.6 man
- 功能:检查命令手册
- 用法:
man [command]
6.7 unendcode
- 功能:解码二进制编码
- 用法:
unendcode [options] [file]
6.8 uudecode
- 功能:解码uuencode编码
- 用法:
uudecode [options] [file]