Linux:系统基本信息扫描(2)


#网络地址:ip a-------------------------------------------------------------
ip a
echo "主机名:-------------------------------------------------------"
hostnamectl
sleep 0.5s
echo "#系统基本信息:-------------------------------------------------------"
#系统基本信息:
uname -a
echo "-------------------------------------------------------"
#Linux发行版信息: 
#lsb_release -a
echo "内核与发行版信息:cat /proc/version-------------------------------------------------------"
#内核与发行版信息:
cat /proc/version
echo "#linux 用户-cat /etc/passwd------------------------------------------------------"
#linux 用户
cat /etc/passwd
echo "#Linux 组查询:  cat /etc/group-------------------------------------------------------"
#Linux 组查询
cat /etc/group
echo "#CPU详细信息:lscpu -a-------------------------------------------------------"
#CPU详细信息:
lscpu -a
echo "#获取CPU模式:-------------------------------------------------------"
#获取CPU模式:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling\_governor
#performance performance代表CPU处于高性能模式
echo "#虚拟机所在物理机的CPU核数:cat /proc/cpuinfo | grep "processor" | wc -l------------------------

你可能感兴趣的:(linux进阶学习,linux,服务器,运维)