linux常用命令(二)

1.查看linux服务器信息 

[root@ipha-dev71-1 nmon]# uname -a        # Linux查看版本当前操作系统内核信息 
Linux ipha-dev71-1 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@ipha-dev71-1 nmon]# cat /proc/version   # Linux查看当前操作系统版本信息
Linux version 3.10.0-693.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Aug 22 21:09:27 UTC 2017
[root@ipha-dev71-1 nmon]# cat /etc/redhat-release  # Linux查看版本当前操作系统发行版信息
CentOS Linux release 7.4.1708 (Core)
[root@ipha-dev71-1 nmon]# cat /proc/cpuinfo   # Linux查看cpu相关信息,包括型号、主频、内核信息等
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 79
model name      : Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
stepping        : 1
microcode       : 0xb000021
cpu MHz         : 2199.180
cache size      : 25600 KB
略
[root@ipha-dev71-1 jenkins]# ifconfig -a # 查看linux的ip地址

 2.

附:以下命令是查看某个端口号是否被占用
[root@ipha-dev71-1 jenkins]# netstat -pan|grep 8080
tcp6       0      0 :::8080                 :::*                    LISTEN      72945/java          
[root@ipha-dev71-1 jenkins]# pwdx 72945
72945: /mnt/sf_tools/inner-pressure
[root@ipha-dev71-1 jenkins]# cd /mnt/sf_tools/inner-pressure

 

posted @ 2019-08-08 23:45  爱打盹的猫猫  阅读(177)  评论(0编辑  收藏  举报