Utilities / Tools for Examining Your System State

  6 years ago

You have installed a fresh new copy of Linux Mint, did a little bit of fiddling with the terminal. But now you want to explore your Hardware as well as the software. So here I am putting down some tools / utilities for your exploration journey. So go ahead fire your terminal and go cracking. To know more about the utility use man or info followed by the tool / utility.

For eg $ man who

Now go exploring your system. Bon Voyage !

User info

who                # prints out all users logged into machine
whoami             # in case you forget who you are
finger name        # get some basic information about accounts with name or username
id                 # list of current user's identifying info (uid, gid, groups, ...)
env                # list all your environment variables


uname -a            # print kernel version
cat /proc/stat      # print lots of system statistics
/proc/sys/          # /proc directory contain lots of kernel variables 
                    # (some can be written to change kernel configuation) 
procinfo            # print out a bunch of system stats from /proc
getconf -a          # list all the system configuration variable values

Hardware Config

lsdev                # list installed hardware
lspci                # list all pci devices
lshw                 # list detailed config of hardware
cat /proc/cpuinfo    # information about processor(s)

# detailed information about cpus is in /sys/devices/system/cpu/ subdirs
# for example to see information about the L1 data cache:
cat /sys/devices/system/cpu/cpu0/cache/index0/size
cat /sys/devices/system/cpu/cpu0/cache/index0/type
cat /sys/devices/system/cpu/cpu0/cache/index0/level

getconf  # will list some cache size info too


free                # information about free memory in the system
cat /proc/meminfo   # information about memory usage in the system
cat /proc/slabinfo  # information about kernel caches
cat /proc/swaps     # informatin about swap partitions
top                 # real-time update of running system: memory use, processes
getconf PAGESIZE    # see the system page size
vmstat              # list virtual memory statistics

Running Processes

top                  # information about processes running on system 
ps -A                # list all processes running on the system
cat /proc/loadavg    # get information about system load
uptime               # load info
xload                # realtime load info

Disk and other devices

du                   # prints out disk usage information 
df                   # displays disk usage summary for each partition
sfdisk -l            # list the partion table for disk devices
cat /proc/scsi/scsi  # see scsi devices known by kernel 
cat /proc/ide        # see ide devices  known by kernel
iostat               # see R and W accesses to different devices
sudo fdisk /dev/sda  # choose option p to print information about the device, q to quit
                     # (you must be root to run fdisk.  be very careful not to choose
                     # options that change the partition tables for this device)

File System

du                   # prints out disk usage information  
df                   # list space on all mounted filesytems 
ls -il               # lists the inode numbers of files
lsof                 # list open files
cat /proc/sys/fs/    # contains files with file system stats
sudo debugfs         # ext2 filesystem debugger 

file filename        # list information about the type of a particular file 
stat filename        # list filesystem information about a particular file 


netstat              # print out information about nw connections, routing tables, etc.
cat /proc/net/dev    #  network device status information 
ifconfig -a          # display configure info for all NW interfaces on system
arp -v 
dig                  # dns lookup 

If you find this tutorial please let me know by voting / comments.

Brukvo 6 years ago

It's the most useful (in most cases) console commands. Really useful tutorial, thanks!

Tookie 6 years ago

Great tutorial. Neatly put together and easy to follow. Nice! Thanks.

dgbutterworth 6 years ago

Very helpful collection of commands, all collected. Thanks.

rksharma 6 years ago

thanks for importent information.

sagit2002 6 years ago

Thanks everybody for appreciation

MagicMint 6 years ago

@Angelanna81: I think the easiest way to do this from your own account is to Right click› Open as Root on their home folder, viz. /home/the_kid’s_username from your file manager. The home folders of the users are accessible from the /home directory which above your own.

Angelanna81 6 years ago

For a new tutorial: maybe its too newbe, but I would find it interesting to know more about how to administrate files ons some-one elses account on the computer. For example: I have made an account on my laptop for my children (2 and 4 years old) and I like to remove, add or change files in their personal map (home)

Angelanna81 6 years ago

Thank you, clear information :-)

zantaz 6 years ago

Thanks :-)

brian_b 6 years ago

Thanks Sagit! This is a very handy cheat sheet. Great work!

Rebel450 6 years ago

REALLY !? = :-* :-* :-* :-)

MagicMint 6 years ago

A very good compilation of those little but useful tools which get forgotten too easily, for they aren’t used really often.

sagit2002 6 years ago

Point taken I will give it a try !!

Rebel450 6 years ago

"Any suggestions for new tutorial..."
= indeed:
How To install Dolphin -the KDE SC version (with Millers Columns)
- on Cinnamon ...

sagit2002 6 years ago

Thanks buddies for your encouragement. Any suggestions for new tutorial. I will love to contribute for community.

Rebel450 6 years ago

It is true by the way.

:-) =
Especially I need to use thisone several times in a day :
"whoami # in case you forget who you are"


Hammer459 6 years ago

Maybe you should warn that editing files in /proc could completely mess up your OS. i.e. user beware and make sure you know what you are doing.

@Rebel450 this is a useful list even if you have worked many years with Linux, not just newbies

Hammer459 6 years ago

Absolutely great list of handy CLI commands!

lib2know 6 years ago

great collection. useful grouping. easy readable format. thumbs up!
many of the commands are new to me.

Rebel450 6 years ago

appreciating your efforts sitting down and type all that stuff into
the stpd editor...
helpful especially for a newbie,
because you have all commands for system info at a glance