How to Check Server Information through SSH commands?

Sometimes, it is required to know about your Server Information, no matter you are using shared hosting plans, VPS or Dedicated Servers. Thus, it is important for users to know about the components and configuration they are using.

Today, in this tutorial, we are going to discuss various commands that you can use to check server information via SSH. You can check the server information from WHM as well but here we have mentioned some commands that can be executed by shared hosting user too.

Check Server Information via SSH
Check Server Information via SSH

To check the server information through SSH commands, first login to SSH with required credentials and then proceed with the below given commands.

#1. Get Detailed Information related to Linux System

You can use any of the below given commands to check the information related to Linux System.

uname
uname -s
uname -v
uname -m
uname -a
Information of Linux System
Information of Linux System

#2. Information Related to File System

With the given commands you can check the information related to files and directories on your server.

a. du command: With this command you will get the information related to all files, directories and sub-directories on your server including their disk usage. To get the information of disk usage related to particular directory or sub-directory you can simply mention the path after the command.

du /home/username/public_html/pathof/the/directory

b. df -h: This command given information in a customized manner, i.e, user can check the available and used memory.

c. free -m or free -mt: With free -m command you can check the total, used and free memory. free -mt command will display the same information with sum total.

Information related to File System
Information related to File System

d.  cat /proc/meminfo: This command displays the total memory of the system. It displays the information stored inside meminfo file inside proc directory.

e. fdisk -l: This command displays the information related to file system partition. This command can be used by root user only.

#3. CPU Information of Linux System

With below given SSH commands you can check the information related to CPU of Linux System.

cat /proc/cpuinfo or lscpu: You can use any of the command to get information related to CPU such as cores, threads, models etc.

#4. Hostname of the Server

You can use any of the below given command to get the hostname of your server.

hostname
uname -n

#5. Linux System Hardware Information

You can check the information related to your hardware by using lshw command.

lshw -short: This command will display the hardware information in a summarize way.

lshw -html > lshw.html: This command will create a file named lshw.html inside current working directory and store the information in html format.

*Information related to Linux System Hardware can only be checked by super user or root user.

#6. Information of Block Devices

You can also check the information of all the blocked devices in Linux using any of the below given command.

lsblk
lsblk -a

Both the command will display the same information related to block devices such as hard disks.

Hope the article better explains the various commands that you can use to check server information. Do share it with your colleagues if you find it working. Connect with us on social media pages.

Facebook Page: https://facebook.com/redserverhost                                                                                       Twitter Page: https://twitter.com/redserverhost.com

Scroll to Top