linux常用命令记录

0、写在前面

记录一些常用的liunx命令,方便查找使用

 

1Pip 安装任何东西都报错

 

Python3

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

python get-pip.py

Python2

curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py

python get-pip.py

 

2、tmux保持会话

新建会话

tmux new -s <session-name>

查看会话

tmux ls

接入会话

tmux attach -t <session-name>

杀死会话

tmux kill-session -t <session-name>

 

3、查看端口占用

ss -tln

 

 

4、systemctl自启动

开机自启动

Systemctl enable xxxx

启动服务

Systemctl start xxxx

停止服务

Systemctl stop xxxx

posted @ 2021-12-22 14:51  隔壁古二蛋  阅读(26)  评论(0编辑  收藏  举报