Linux Terminal Commands - System Information related commands

Linux Terminal Commands: In this tutorial, we will learn some of the most common Linux terminal commands (system related) with their examples. By IncludeHelp Last updated : June 03, 2023

1) date

Shows the current system's date & time.

ih@linux:~$ date
Mon, Apr  6, 2015  9:47:34 PM

2) whatis

This command shows the short description (definition) of a command.

ih@linux:~$ mkdir --help

3) CMD --help

This command shows the command’s help with the description and their options.

ih@linux:~$ mkdir --help
Usage: mkdir [OPTION]... DIRECTORY...
Create the DIRECTORY(ies), if they do not already exist.

Mandatory arguments to long options are mandatory for short options too.
  -m, --mode=MODE   set file mode (as in chmod), not a=rwx - umask
  -p, --parents     no error if existing, make parent directories as needed
  -v, --verbose     print a message for each created directory
  -Z                   set SELinux security context of each created directory
                         to the default type
      --context[=CTX]  like -Z, or if CTX is specified then set the SELinux
                         or SMACK security context to CTX
      --help     display this help and exit

4) man CMD

This command shows the manual of command or function.

ih@linux:~$ man mkdir
MKDIR(1)                         User Commands                        MKDIR(1)

NAME
       mkdir - make directories

SYNOPSIS
       mkdir [OPTION]... DIRECTORY...

DESCRIPTION
       Create the DIRECTORY(ies), if they do not already exist.

       Mandatory  arguments  to  long  options are mandatory for short options
       too.

       -m, --mode=MODE
              set file mode (as in chmod), not a=rwx - umask
              ........

5) whoami

This command displays the name of the current user (who is logged on).

ih@linux:~$ whoami
ih

6) who am i

This command displays the name of the logged on users with terminal name and logged on time.

ih@linux:~$ who am i
ih  pts/1       2015-04-06 22:17
..
..

7) who

This command displays the information about all logged in users with terminal, time etc.

ih@linux:~$ who
ih      pts/1       2015-04-06 22:17
mike    pts/2       2015-04-06 22:19

8) uptime

This command tells how long system has been running.

ih@linux:~$ uptime
19:20:35    up  1:09, 2 users, load average: 0.05, 0.12, 0.10

Here,

  • 19:20:35 - is current system time.
  • 1:09 - system running time.

9) pwd

Stands for "print working directory", is used to display current working direcotry, inwhich you are.

ih@linux:~$ pwd
/home/ih

10) cat /proc/cpuinfo

Displays the cpu information.

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Duo CPU     T6600  @ 2.20GHz
stepping        : 10
cpu MHz         : 2195.000
cache size      : 2048 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae ...
TLB size        : 0 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Duo CPU     T6600  @ 2.20GHz
stepping        : 10
cpu MHz         : 2195.000
cache size      : 2048 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8...
TLB size        : 0 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

11) cat /proc/meminfo

Displays the memory information.

$ cat /proc/meminfo
MemTotal:        3105660 kB
MemFree:         1520568 kB
HighTotal:             0 kB
HighFree:              0 kB
LowTotal:        3105660 kB
LowFree:         1520568 kB
SwapTotal:       1245184 kB
SwapFree:         961652 kB

11) w

Shows the login name os the user, who is online

12) logout

Logouts from the current login.

13) lscpu

This commands shows the CPU process unit related information such as architecture, cpu mode, Byte Order, CPU(s) core, Vednor Id etc.

14) lshw

Stands for "list hardware". This command lists the detailed and brief information about the multiple hardware such as cpu, memory, usb controllers, disks etc. It displays the information from the different /proc files.

15) hwinfo

Another utility that shows the detailed and brief information about the multiple hardwares, it displays the more & detailed information than lshw command.

16) lsusb

Stands for "list USB". It shows the detailed & brief information about the USB controllers and connected USB(s) devices.

17) lsblk

Stands for "list Block". It shows the detailed & brief information about the installed block device drivers.

18) df

It shows the disk space of the file system.

19) free

It shows the total, used and free RAM size of the system.

20) mount

It shows the mounted file systems.



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.