加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
systeminfo 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
# Program:
# This program shows
# History:
# 2017-05-18 zmqc First release
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
OLDIFS=$IFS
IFS=$'\n'
wlp9s0=`ip a show wlp9s0|awk '/ether|inet/{print $2}'`
mylspci=`lspci |awk -F': ' '/(VGA|Eth|Net)/{print $2}'`
i=0
for var in $wlp9s0
do
myips[$i]="${var}"
i=$[$i + 1]
done
myIntel=`echo "${mylspci}"|grep -i 'intel'`
myAmd=`echo "${mylspci}"|grep -i 'amd'`
myEth=`echo "${mylspci}"|grep -i 'eth'`
myWifi=`echo "${mylspci}"|grep -i 'wifi'`
IFS=$OLDIFS
echo "Product Name:" `cat /sys/class/dmi/id/board_vendor` \
`cat /sys/class/dmi/id/product_version` \
`cat /sys/class/dmi/id/product_name `
echo "Bios Info:" `cat /sys/class/dmi/id/bios_vendor ` \
`cat /sys/class/dmi/id/bios_version ` \
`cat /sys/class/dmi/id/bios_date `
echo " OS:" `hostnamectl |awk -F ': ' '/System/{print $2}'`
echo " Kernel:" `uname -r`
echo " Shell:" "Bash" ${BASH_VERSION%(*}
echo " DE:" $XDG_CURRENT_DESKTOP
echo " CPU:" `cat /proc/cpuinfo |awk -F': ' '/model name/{print $2; exit}'`
echo " GPU:" $myIntel
echo " GPU:" $myAmd
echo " Eth:" $myEth
echo " Wifi:" $myWifi
echo " Time:" `date`
echo " Uptime:" `uptime --pretty`
echo " IPV4:" ${myips[1]}
echo " IPV6:" ${myips[2]}
echo " MAC:" ${myips[0]}
echo " RAM:" `free -h | awk '/Mem/{print $3 "/" $2}'`
echo " SWAP:" `free -h | awk '/Swap/{print $3 "/" $2}'`
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化