In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you what the commands commonly used in CentOS are. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
One: check cpu
More / proc/cpuinfo | grep "model name"
Grep "model name" / proc/cpuinfo
If you feel the need to see more comfortable
Grep "model name" / proc/cpuinfo | cut-f2-d:
Two: check the memory
Grep MemTotal / proc/meminfo
Grep MemTotal / proc/meminfo | cut-f2-d:
Free-m | grep "Mem" | awk'{print $2}'
Three: check whether the cpu is 32-bit or 64-bit
View CPU digits (32 or 64)
Getconf LONG_BIT
Four: check the current version of linux
More / etc/redhat-release
Cat / etc/redhat-release
Five: check the kernel version
Uname-r
Uname-a
Six: view the current time
Date
It has already introduced how to synchronize time.
Seven: view hard drives and partitions
Df-h
Fdisk-l
You can also view partitions
Du-sh
You can see all the space occupied.
Du / etc-sh
You can see the size of this directory
Eight: check the installed software packages
Check the software packages installed when the system is installed
Cat-n / root/install.log
More / root/install.log | wc-l
Check which packages have been installed now
Rpm-qa
Rpm-qa | wc-l
Yum list installed | wc-l
Strangely, however, the number of installation packages I have queried through rpm and yum is not the same. I can't find the reason.
Nine: view the keyboard layout
Cat / etc/sysconfig/keyboard
Cat / etc/sysconfig/keyboard | grep KEYTABLE | cut-f2-d =
Ten: check the selinux situation
Sestatus
Sestatus | cut-f2-d:
Cat / etc/sysconfig/selinux
Eleven: check the ip,mac address
You can see mac, gateway and other information in the ifcfg-eth0 file.
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.1'| cut-d:-f2 | awk'{print $1}'
View Gateway
Cat / etc/sysconfig/network
View dns
Cat / etc/resolv.conf
Twelve: view the default language
Echo $LANG $LANGUAGE
Cat / etc/sysconfig/i18n
Thirteen: check the time zone and whether to use UTC time
Cat / etc/sysconfig/clock
Fourteen: view hostname
Hostname cat / etc/sysconfig/network modifies the hostname to modify the file, and * * also modifies the host file. # du-sh # View the size of the specified directory # uptime # View system running time, number of users, Load # cat / proc/loadavg # View system load # iptables-L # View Firewall Settings # route-n # View routing Table # netstat-lntp # View all listening Ports # netstat-antp # View all established connections # netstat-s # View Network Statistics # w # View active user # id # View specified user Information # Last # View user login log # cut-d:-F1 / etc/passwd # View all users of the system # cut-d:-F1 / etc/group # View all groups of the system # crontab-l # View the current user's scheduled tasks # chkconfig-list # list all the system services listed above are the common CentOS commands shared by the editor If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.