【备忘】Linux, Shell 常用命令,不定时更新
来源:互联网 发布:python time.sleep修改 编辑:程序博客网 时间:2024/06/06 05:43
1. 获取当前系统时间:
$ dateWed Feb 19 19:22:15 CST 2014
$ date +%Y%m%d20140219
$ date +%Y-%m-%d2014-02-19
$ date +%Y%m%d%H%M%S20140219192653
$ date '+%Y-%m-%d %H:%M:%S' 2014-02-19 19:27:502. Create a new usersudo 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 groupsudo groupadd newgroup 4. Delete usersudo userdel jason-r also delete the main folder of the user5. User Managementsudo 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
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
0 0
- 【备忘】Linux, Shell 常用命令,不定时更新
- linux系统管理常用命令(不定时更新)
- linux常用命令总结(不定时更新)
- Linux终端常用命令(不定时更新)
- Linux Shell命令(不定时更新)
- Linux shell 常用命令备忘
- 关于linux ubuntu的常用命令(不定时更新)
- linux bash shell 常用命令备忘
- Linux Shell脚本小程序不定时更新
- [备忘] linux 有用却不常用命令
- [备忘] linux 有用却不常用命令
- <Linux>Linux指令(不定时更新)
- linux Shell常用命令(持续更新)
- Linux Shell 常用命令总结(持续更新)
- shell脚本的学习记录(不定时更新)
- linux 常用命令备忘
- LINUX常用命令备忘
- LINUX常用命令备忘
- 二叉平衡树
- 无向图的邻接表创建以及图的深度和…
- NYOJ-题目27 水池数目
- <将博客搬至CSDN>
- HeadFirst 设计模式-观察者模式
- 【备忘】Linux, Shell 常用命令,不定时更新
- VS 2005 beta2 到 正式版 升级后的问题。
- 逆波兰表达式算法
- Linux下常用文本处理命令
- CEdit 清空、设置多行显示
- 使用包装设计模式,实现标准连接池
- 市委组织部项目--js调用后台方法(一)
- PNG的使用技巧—PC端中常用的Png格式是哪些?
- 简单的内存管理