Utilities / Tools for Examining Your System State

sagit2002
  9 years ago
  30

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

Kernel

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

Memory

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 

Network

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.

Comments
Brukvo 8 years ago

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


Tookie 8 years ago

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


dgbutterworth 8 years ago

Very helpful collection of commands, all collected. Thanks.


rksharma 9 years ago

thanks for importent information.


sagit2002 9 years ago

Thanks everybody for appreciation


MagicMint 9 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 9 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 9 years ago

Thank you, clear information :-)


zantaz 9 years ago

Thanks :-)


brian_b 9 years ago

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


Rebel450 9 years ago

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


MagicMint 9 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 9 years ago

@Rebel450
Point taken I will give it a try !!


Rebel450 9 years ago


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


sagit2002 9 years ago

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


Rebel450 9 years ago

@Hammer459:
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 9 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 9 years ago

Absolutely great list of handy CLI commands!


lib2know 9 years ago

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


Rebel450 9 years ago

Thanks,
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
+