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

echo "#网络地址"
echo "#ip a"
ip a
echo "#主机名"
echo "#hostnamectl status"
hostnamectl status
sleep 0.5s
echo "#系统基本信息"
echo "#uname -a"
uname -a
echo "#内核与发行版信息"
echo "#cat /proc/version"
cat /proc/version
echo "#linux用户"
echo "#cat /etc/passwd"
cat /etc/passwd
echo "#Linux 组查询"
echo "#cat /etc/group"
cat /etc/group
echo "#CPU详细信息"
echo "#lscpu -a---------"
#lscpu -a
echo "#获取CPU模式"
echo "#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling\_governor"
#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling\_governor
#performance performance代表CPU处于高性能模式
echo "#虚拟机所在物理机的CPU核数"
echo '#cat /proc/cpuinfo | grep "processor" | wc -l'
cat /proc/cpuinfo | grep "processor" | wc -l
echo "#内存使用情况"
echo "#free -h"
free -h
echo "#网络接口信息"
echo "#ifconfig"
ifconfig
echo "#网络链路信息"
echo "#ip link show"
ip link show
echo "#网络连接相关信息"
echo "#netstat -i"
netstat -i
echo "#统计网络接口活动状态的工具"
echo "#ifstat -tT"
ifstat -tT
echo "#查看主机路由信息"
echo "#route -n"
route -n
echo "#磁盘分区信息"
echo "#fdisk -l"
fdisk -l
echo "#获取磁盘信息"
echo "#lsblk"
lsblk
echo "#查看挂接的分区状态"
echo "#mount | column -t"
mount | column -t
echo "#磁盘使用情况"
echo "#df -lhT"
df -lhT
echo "#USB设备信息"
echo "#lsusb"
lsusb
echo "#PCI设备信息"
echo "#lspci"
lspci
echo "#系统硬件详细信息"
echo "#dmidecode"
dmidecode
echo "#查看bois信息"
echo "#dmidecode -t bios"
dmidecode -t bios
echo "#查看centos上安装了多少个软件"
echo "#rpm -qa | wc -l"
rpm -qa | wc -l
echo "#所有的服务状态"
echo "#chkconfig --list"
chkconfig --list
echo "#显示所有运行中的进程"
echo "#ps aux"
ps aux
echo "#查看非root运行的进程"
echo "#ps -U root -u root -N"
ps -U root -u root -N
echo "#查看用户vivek运行的进程"
echo "#ps -u vivek"
ps -u vivek
echo "#显示进程的树状图"
echo "#pstree"
pstree
echo "#检查防火墙状态"
echo "#systemctl status firewalld"
systemctl status firewalld
echo "#查看开放的端口"
echo "#firewall-cmd --list-ports"
firewall-cmd --list-ports
echo "#检查IPtables信息"
echo "#iptables -nL"
iptables -nL
echo "#Iptables 查看配置文件"
echo "#cat /etc/sysconfig/iptables-config"
cat /etc/sysconfig/iptables-config
echo "#检查linux 下是否安装java(jdk)环境"
echo "#java -version"
java -version
which java
rpm -qa |grep java
echo $PATH 
echo "#检查python环境"
echo "#which python"
which python
python --version
echo "#检查用户环境变量配置"
echo "#cat ~/.bashrc"
cat ~/.bashrc
echo "#linux-ssh互信配置"
echo "#cat ~/.ssh/known_hosts"
cat ~/.ssh/known_hosts
echo "#查看系统环境变量"
echo "#cat /etc/environment"
cat /etc/environment
echo "#systemd系统服务"
echo "#systemctl list-unit-files"
systemctl list-unit-files
echo "#查看安装的软件包"
echo "#rpm -qa | sort"
rpm -qa | sort
echo "#使用netstat 命令查看系统服务"
echo "#netstat -pnltu"
netstat -pnltu

echo "#检测k8s版本"
echo "#kubectl version"
kubectl version
echo "#检测docker版本"
echo "#docker version"
docker version

你可能感兴趣的:(linux进阶学习,linux)