Check whether the linux version is centos or redhat linux

The most accurate is to check cat /etc/redhat-release

reference: https://zhidao.baidu.com/question/281195316.html


The lsof command "-bash: lsof: command not found" cannot be used under centos6

1. The problem is described
in Under centos, the command lsof cannot be used, and the following information appears:
# lsof -i:3690  
-bash: lsof: command not found  


2. Solution
We can install it through yum:
# yum install lsof  


3. Several common commands of lsof
lsof -i: (port number)


For example,
lsof -i:3306 (3306 is the port of the mysql server by default)
lsof -i:3690 (3690 is the port of the svn server by default)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326276894&siteId=291194637