0% found this document useful (0 votes)
19 views

S.N O Command Options Purpose Comme Nts

This document contains a list of Linux commands and their purposes. It includes commands to check system information like the logged in user, OS version, and hardware; view and manage files, partitions, and filesystems; manage users and passwords; switch users; view and manage process information; and configure terminals and displays. The document provides explanations of commands for tasks like system monitoring, user administration, and graphical interface management in a Linux environment.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

S.N O Command Options Purpose Comme Nts

This document contains a list of Linux commands and their purposes. It includes commands to check system information like the logged in user, OS version, and hardware; view and manage files, partitions, and filesystems; manage users and passwords; switch users; view and manage process information; and configure terminals and displays. The document provides explanations of commands for tasks like system monitoring, user administration, and graphical interface management in a Linux environment.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

S.

N
O
Command
1 echo $USER
whoami
2 Cat /etc/redhat-release
3 uname
4 init
5
6
7
8
9
10
11
12
13

dmidecode
cat /proc/cpuinfo
cat /proc/meminfo
last
last reboot
lsblk
pwd
fdisk -l
parted <devicename>
Print free
q

14
15
16
17

cat /proc/partitions
echo $SHELL
chsh
cat /proc/filesystem

18
19
20
21

arch
tput set 'n'
tput bold
tput reset

Options

Purpose
To check the user logged in

n: 1 - 9

To check the version


To check OS
6 reboot
0 shutdown
Hardware information
CPU info
Memory info
last usage commands time
Last reboot information
Partitions information
Current working directory
Type of hard disks used
To check available space
To view the space
quit
To check the Kernel
partitions
Current shell
to change the shell
List on filesystems
Check Architecture
(Processor)
Font colours
Bold letters
Normal letters
Refresh /etc/passwd and
/etc/shadow files

22 pwck
23 grpck
24 passwd -S <user>
-d
passwd <user>
25 useradd <user>
-u
-g
-c
-s

Refresh /etc/group and


/etc/gshadow files
To check the P/w status
To delete the user password
To change user password
To create a user
To specify uid
To specify gid
To add comment (Full
name). To be added inside
""
To specify the default shell
of the user

Comme
nts

26 usermod <user>

To modify user
Same options
as above
applicable

27 chage -l <user>
28 userdel <user>
29 Vim /etc/default/useradd

Password age detials of the


user
To delete the user
Change the default home
directory created for the
users

31 su <user>

Set the range for uid and


gid of the users created
To switch user without
changing the home
directory

32 su - <user>

To switch user along with


the home directory

30 Vim /etc/login.def

33 pwunconv
34 pwconv
gnome-session-save --force
35 -logout
36 history -c
37 history -r
38 .bash_history

39
40
41
42
43

echo $HISTSIZE
Vim /etc/profile
source /etc/profile
Alt+U
Alt+l

44
45
46
47

!!
file
tac <filename>
stat <filename>
Proxy is used to share the
48 internet.
49 w
50 ps -av

To disable shadow file and


copy info to passwd file
To enable shadow file and
remove shadow file data
from passwd file
To logout the user
To clear history
To recover history
Location of history file
To check the history size
(How many commands to
be show on history
command)
To change the history size
To update the script files
Uppercase
Lowercase
To check the last executed
command
Identify type of file
Read a file in reverse order
More info about the file
Default port for proxy is
3128
To list no. of users logged in
and actvity
To list the pids for the user
activities

51 chvt 1
52 chvt 2 - 6
53 startx
54 /etc/inittab

chvt 7

To switch to grahical
terminal
Virtual consoles
To switch to grahical
console
Config file for the console

You might also like