美文网首页
Linux服务器常用命令

Linux服务器常用命令

作者: Zimix | 来源:发表于2018-11-29 12:02 被阅读0次

连接服务器

  • 命令: ssh username@host/ip地址

随后输入密码即可连接

查看进程

  • 命令: top
  • 命令: ps -aux

PID是进程编号

  • 命令: ps aux | grep PID_num

命令得到更详细的进程信息

  • 命令:ll /proc/PID_num

进入进程目录(ll是LL的小写)

执行进程

  • 命令: nohup command $

控制台的输出回保存在output文件里面

# 在服务器端运行python脚本test.py(本地的cmd端口关闭了服务器端口也会继续运行)
nohup python test.py $

终止进程

通过查询进程确认进程PID,然后使用命令 kill PID 即可杀死进程:

kill PID_num

其他操作命令

Linux系统使用简介
https://blog.csdn.net/weixin_42840933/article/details/85780125

相关文章

网友评论

      本文标题:Linux服务器常用命令

      本文链接:https://www.haomeiwen.com/subject/aluttqtx.html