Linux Troubleshooting Commands

  1. Getting CPU Info.

Sometimes in troubleshooting we want to know what processor we are dealing with along with how much cpu is currently being used by our OS and programs. We can do this with these two commands.

Command to find the CPU information:

cat /proc/cpuinfo

2. CPU usage by running programs

3. List PCI and USB devices



4. Checking Disk space utilization

df -h

5. Checking network interface card information


inconfig <interface name> (on below case, ens33)

6. Assigning IP Address

Ifconfig <interface name> <IP address> netmask <subnet mask>

7.  Command to find network statistics

netstat -r ( this will display route)


8. Domain Information Groper (DIG)

This queries the information related to CNAME, MX Record, A Record etc.

9. mii-tool – This tool is to view the settings, speed and duplex. This is available in xubuntu.

mii-tool <interface name> <options>

10. ethtool – In some linux systems, this tool is available as replacement of mii-tool. if ethtool is not installed, then install it by sudo apt install ethtool

11. Uptime – This command will show you the uptime of the system, load average, number of logged in users.


uptime -p ( pretty simple uptime)

uptime -s (uptime since)

12. Kernel Errors – dmesg – This will show kernel buffer errors.


dmesg -T (with proper format)


dmesg -T | tail (showing last 10 messages)















You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.