Linux
- 1.获取登录信息
1 | ubuntu@root:~$ w |
1 | ubuntu@root:~$ who |
1 | ubuntu@root:~$ who am i |
1 | ubuntu@root:~$ last |
- 2.查看使用shell
1 | ubuntu@root:~$ ps |
- 3.查看命令说明
1 | ubuntu@root:~$ whatis su |
- 4.查看命令位置
1 | ubuntu@root:~$ which python3.6 |
1 | ubuntu:~$ whereis python3.6 |
1 | ubuntu@root:~$ whatis which |
1 | ubuntu@root:~$ whatis whereis |
- 5.查看帮助文档
1 | ubuntu@root:~$ man su |
- 6.创建、删除目录
1 | ubuntu@root:~$ mkdir abc |
- 7.创建、删除文件
1 | ubuntu@root:~$ touch readme.txt |
- 8.切换和查看目录
1 | ubuntu@root:~$ cd abc |
- 9.拷贝、移动文件
1 | ubuntu@root:~$ cp readme.txt abc |
- 10.查找文件和内容
1 | ubuntu@root:~$ find / -name "python" |
- 11.查看文件内容
1 | ubuntu@root:~$ cat -n readme.txt |
- 12.统计文件大小
1 | ubuntu@root:~$ du -h readme.txt |
- 13.查看系统负载
1 | ubuntu@root:~$ top |
- 14.结束进程
1 | # 结束vim进程 |
- 15.管道符
1 | '|' 管道符左边命令的输出会作为管道符右边命令的输入 |
- 16.alias别名
1 | ubuntu@root:~$ alias rm='echo do not use rm' |
- 17.特殊符号
1 | # >> 将输出追加到文件的结尾 |
- 18.时间和日期
1 | ubuntu@root:~$ date |
- 19.访问权限
1 | ubuntu@root:~$ ubuntu@root:~$ chmod 777 readme.txt |
- 20.磁盘管理
1 | # 磁盘使用状况 |
- 21.Vi/Vim的使用
1 | # 插入模式 |
未完待续…
v1.5.2