Linux: Difference between revisions

From roonics
Jump to navigation Jump to search
Line 16: Line 16:
</pre>
</pre>


====test1====
====Show what version of Linux is running====
 
<pre>cat /etc/*release</pre>
 
Example output:
<pre style="color: silver; background: black;">
CentOS Linux release 7.5.1804 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
 
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
 
CentOS Linux release 7.5.1804 (Core)
CentOS Linux release 7.5.1804 (Core)
</pre>





Revision as of 14:39, 12 March 2019

Linux

Useful Commands

Show what is listening on what port

netstat -tulpn | grep LISTEN

Example output:

tcp        0      0 0.0.0.0:5666            0.0.0.0:*               LISTEN      685/nrpe
tcp        0      0 127.0.0.1:199           0.0.0.0:*               LISTEN      958/snmpd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      962/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1179/master
tcp6       0      0 :::5666                 :::*                    LISTEN      685/nrpe
tcp6     129      0 :::2224                 :::*                    LISTEN      663/ruby
tcp6       0      0 :::22                   :::*                    LISTEN      962/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      1179/master

Show what version of Linux is running

cat /etc/*release

Example output:

CentOS Linux release 7.5.1804 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.5.1804 (Core)
CentOS Linux release 7.5.1804 (Core)