linux 常用命令

来源:互联网 发布:java 执行命令 带参数 编辑:程序博客网 时间:2024/05/16 00:44
查看tomcat相关线程

ps -aux|grep tomcat


查看所有安装的内核

dpkg --get-selections|grep linux


apt-get --purge remove <package_name>

If apg-get --purge fails to remove the package try:

Check the deinstalled packages to make sure you really want to remove them


dpkg --get-selections | grep deinstall | cut -f1


Execute dpkg --purge

dpkg --purge `dpkg --get-selections | grep deinstall | cut -f1`



查看哪个服务在用8080端口

grep 8080 /etc/services


查看8080端口的服务连接现在有哪些

netstat -pan|grep 8080


how to remove ruby?

$ which ruby/usr/bin/ruby

Use this to find out what it actually is:

$ readlink -f /usr/bin/ruby/usr/bin/ruby1.8

Use this to find out what package it belongs to:

$ dpkg -S /usr/bin/ruby1.8ruby1.8: /usr/bin/ruby1.8

Use this to uninstall that:

$ apt-get purge ruby1.8



0 0