記錄192.168.0.148機器之Centos命令

來源:互聯網
上載者:User

記錄192.168.0.148機器之Centos命令 1. 查看cpu grep "model name" /proc/cpuinfo 2. 查看cpu是32位還是64位 getconf LONG_BIT 3. 查看當前linux的版本 cat /etc/redhat-release ~~~CentOS release 5.8 (Final)~~~ 4. 查看核心版本 uname -r uname -a 5. 查看記憶體grep MemTotal /proc/meminfo  grep MemTotal /proc/meminfo | cut -f2 -d:  free -m | grep "Mem" | awk '{print $2}' 6. 查看硬碟和分區  df -h  fdisk -l  也可以查看分區du -sh  可以看到全部佔用的空間du /etc -sh 可以看到/etc目錄的大小  7.  查看安裝的軟體包查看系統安裝的時候裝的軟體包cat -n /root/install.logmore /root/install.log | wc -l  8. 查看鍵盤配置cat /etc/sysconfig/keyboardcat /etc/sysconfig/keyboard | grep KEYTABLE | cut -f2 -d=  9. 查看selinux情況sestatussestatus | cut -f2 -d:cat /etc/sysconfig/selinux  10. 查看ip,mac地址在ifcfg-eth0 檔案裡你可以看到mac,網關等資訊。  ifconfig  cat /etc/sysconfig/network-scripts/ifcfg-eth0 | grep IPADDR  cat /etc/sysconfig/network-scripts/ifcfg-eth0 | grep IPADDR | cut -f2 -d=  ifconfig eth0 |grep "inet addr:" |awk '{print $2}' | cut -c 6-  ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'  查看網關  cat /etc/sysconfig/network  查看dns  cat /etc/resolv.conf 查看預設語言echo $LANG $LANGUAGEcat /etc/sysconfig/i18n 11. 查看所屬時區和是否使用UTC時間cat /etc/sysconfig/clock 12. 查看主機名稱cat /etc/sysconfig/network修改主機名稱就是修改這個檔案,同時最好也把host檔案也修改。  13. 查看開機已耗用時間uptime  14. 查看主板資訊 dmidecode | more

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.