常用命令

常用命令

Linux命令

  1. netstat -lntp 常看端口占用
  2. kill - 9 进程号 杀死进程
  3. ps -ef|grep nginx 查看某一个进程
  4. df -hl 查看磁盘剩余空间
  5. 数据上传服务器
    ``````
    ssh root@example.coom(ip)
    input password,进入服务器,显示基本信息,以及上次登录时间、ip等
    1
    6. 前端打包文件
    npm run build
    cd build
    执行scp -r ./* root@example.com(ip):/data/…
    1
    2

    ## Nginx命令
    sudo nginx
    nginx -s reload|reopen|stop|quit
    1
    2
    3

    ## Python(Django)命令
    1. 服务端启动命令
    nohup ./manage.py runserver 0.0.0.0:10014 > /dev/null 2>1 &
    1
    2

    2. Python3虚拟环境
    python3 -m venv file_name
    source bin/activate
    deactivate
    1
    2

    3. Python安装依赖包
    pip install -r requirements.txt
    1
    2

    4. 将依赖包freeze
    pip freeze > requirements.txt
    1
    2
    3
    4
    ## Markdown转HTML

    ```aglio使用命令:
    aglio --theme-variables flatly --theme-template triple -i api.md -o output.html