Linux Centos 常用命令

  1. 安装程序包:yum install 包名
  2. 下载程序包:wget 程序包URL
  3. 解压tar包:tar -zxvf 程序包名
  4. 编译和安装本地程序包:make
  5. 查看本地所有开放的端口:netstat -nltp
  6. 查看指定端口和它的进程ID:netstat -ano | find "端口"
  7. 统计指定端口建立的连接次数: netstat -ano | grep 6379 | wc -l
  8. 查看正在运行中的程序对应的PID号:ps -ef | grep 进程名
  9. 强制删除目录及它下面所有文件:rm -rf redis-3.2.8
  10. 查看某个端口上进程的详细信息:ss -tanp|grep 6379
  11. 在命令结尾加”&”符号可以让命令在后台运行
  12. 共享目录设置: vi /etc/profile
  13. 共享目录设置完成后,立即更新:source /etc/profile
  14. linux上端口是否正常监听:curl localhost:8072
  15. linux是否开了防火墙:systemctl status firewalld
  16. 将linux启动时,防火墙策略改为关闭:systemctl disable  firewalld
  17. 设置当前系统的防火墙服务停止:systemctl stop firewalld
posted @ 2018-02-26 11:12  shw0099  阅读(202)  评论(0编辑  收藏  举报