【备忘】Linux, Shell 常用命令,不定时更新
2014-02-19 19:26
483 查看
1. 获取当前系统时间:
6. 搜索已经安装的软件: dpkg -l (dpkg -l | grep <关键字搜索>)
7. 搜索对应的软件进程:ps -aux | grep <name>
8. 搜索对应的软件端口:netstat -lnpt | grep <name>
9. 强制删除某进程: kill -s 9 <pid>
10. 设置当服务器启动后自动启动某个应用: 修改 /etc/rc.local 添加对应的程序启动命令即可
11. 查看内存占用前10名的进程:ps -aux | sort -k4nr | head -n 10
$ date Wed Feb 19 19:22:15 CST 2014
$ date +%Y%m%d 20140219
$ date +%Y-%m-%d 2014-02-19
$ date +%Y%m%d%H%M%S 20140219192653
$ date '+%Y-%m-%d %H:%M:%S' 2014-02-19 19:27:50
2. Create a new user | sudo useradd -m jason sudo passwd jason | -m auto create the main folder -g assign a group for the user -s define the default shell(-s /bin/bash) |
3. Create a new group | sudo groupadd newgroup | |
4. Delete user | sudo userdel jason | -r also delete the main folder of the user |
5. User Management | sudo usermod | -r modify the main folder -e modify the expire date -g modify the group -l modify the name of the user -s modify the defalut using shell after user login e.g. sudo usermod -l mike -d /home/mike -e 02/20/2014 jason |
7. 搜索对应的软件进程:ps -aux | grep <name>
8. 搜索对应的软件端口:netstat -lnpt | grep <name>
9. 强制删除某进程: kill -s 9 <pid>
10. 设置当服务器启动后自动启动某个应用: 修改 /etc/rc.local 添加对应的程序启动命令即可
11. 查看内存占用前10名的进程:ps -aux | sort -k4nr | head -n 10
相关文章推荐
- 关于linux ubuntu的不常用命令(不定时更新)
- Linux 的一些常用命令(不定时更新)
- Linux常用Shell命令(不断更新。。。)
- linux常用命令总结 ---不定时更新
- 关于linux ubuntu的常用命令(不定时更新)
- linux常用命令总结(不定时更新)
- linux自己常用命令总汇--不定时更新
- [置顶] Linux终端常用命令(不定时更新)
- linux常用shell命令(不断更新中...)
- linux常用命令备忘(不断更新中...)
- linux bash shell 常用命令备忘
- Linux不太常用,但是偶尔会用到的命令备忘(持续更新)
- [29期] [Linux常用]Shell 命令和语句
- linux常用shell命令
- Linux常用命令笔记--定制Shell环境
- 嵌入式学习2(Linux常用shell命令上)
- linux中执行shell命令的几种常用方法
- 《Linux Shell Scripting Cookbook》Linux常用命令笔记(一)
- Linux常用命令速查备忘1
- Linux常用命令和工具摘要 (持续更新中)