VPS novice knowledge, share some common Linux configurations and hardware detection commands, and come with a collection of one-click SHELL scripts

888u

Last update at :2024-01-15,Edit by888u

Share some common Linux commands mainly used to detect server configuration and hardware information, including operating system, CPU, memory, hard disk partition, system time, load, network-related, process, user, power on and off, startup, etc. It is suitable for current mainstream operating systems, such as centos, ubuntu, debian, etc.

Operating system version

$ uname -a # Operating system version Check the system, host name, kernel version, system architecture and other commands $ top # Overview system comprehensive information command, Ctrl + C to exit the interface $ hostname # View server hostname command $ cat /etc/issue # Check the Ubuntu Debian distribution version command $ cat /etc/redhat-release # Check the CentOS RedHat system release version command $ cat /etc/os-release # View common Linux distribution version command

CPU related commands

$ cat /proc/cpuinfo # Check the CPU core number, architecture, name, frequency, cache, instruction set and other commands $ grep name /proc/cpuinfo # View CPU name command $ grep cores /proc/cpuinfo # Check the number of CPU cores command $ grep MHz /proc/cpuinfo # Check CPU frequency command

View memory command

$ cat /proc/meminfo # Command to view memory hardware related information $ free -m # View total memory, usage, swap information and other commands $ swapon -s # View the path and size command of the swap partition

View hard disk partitions and related information

$ df -h # Check hard disk partition and usage command $ du -sh [specify path] # View the file or directory size command at the specified path $ fdisk -l # Check hard disk size, quantity, type command

View system time load and related information

$ uptime # Check the boot time, number of system users, and average load command $ cat /proc/loadavg # View system load command $ w # View system time, load, logged in user, user resource usage command $ top # Overview system comprehensive information command, Ctrl + C to exit the interface

Check network related conditions

$ ifconfig # Check the network card and local IP status command (requires the system to install the net-tools tool) $ ip addr show # The function is the same as above. New Linux distributions have gradually replaced the ifconfig related function commands with the ip command. $ iptables -L # Command to view firewall and other related conditions $ netstat -s # View system network connection statistics command $ netstat -tunlp # Check the server port listening usage command $ netstat -auntp # Check the port status of the established connection command $ lsof -i:[port] # Command to view the occupancy of the specified port $ route -n # View routing table command

View process related commands

$ ps -aux # List all processes and related information commands $ kill -9 [Process PID] # After getting the PID of the relevant process from the above command, use the high-privilege kill command to kill the process. $ top # Overview system comprehensive information command, Ctrl + C to exit the interface

View user related commands

$ w # View system time, load, logged in user, user resource usage command $ cut -d: -f1 /etc/passwd # View all user commands in the system $ last # Check the previous login status of the system $ crontab -l # Command to view user scheduled tasks $ crontab -e # Edit scheduled task command

View boot-related commands

$ chkconfig # View the boot service command $ ls /etc/init.d # View the boot configuration file command $ cat /etc/rc.local # View rc startup file

One-click SHELL scripts we collected

[su_button url="https:///shell" target="blank" style="ghost" background="#ef2d3a" color="#ef2d3a" size="5" center="yes" radius=" round" icon="icon: rocket" icon_color="#ef2d3a"]One-click shell script[/su_button]

Recommended site searches: free cn domain name registration, virtual host evaluation, dynamic ip dialer, ip purchase, US independent host, registration-free space, local ip query, mainland China station group server, cheap domain name, Taiwan server, < /p>

VPS novice knowledge, share some common Linux configurations and hardware detection commands, and come with a collection of one-click SHELL scripts

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码