1 pwd -----------> presente working directory
2 ls -----------> used to listing the files and directory
3 cd <path> ------> to change the directory
4 cd .. ----------> used to come one step back
5 ls -la -----------> used to listing the hiden files and directory
6 ll ------------> long listing files and directory
7 mkdir <directory_name> ----------> to make a directory
8 touch <text_file_name> ----------> to make a text file
9 cd ---------------> to come in the root directory
10 nano <file_name> --------> used to create or open a file
11 cat <file_name> --------> to display the content of a file into terminal
12 cp <file_name> <path> -----> to copy a file
13 cp -r <directory_name> <path> -----> to copy a directory
14 mv <file/directoy> <path> -------> to move a file and directory
15 mv <old_file/directory> <new_file/directory> -------------> to rename a file
directory
#User & group managment || File Permission
#types of users
1- adminstrator or root //higer priviliges
2- normal user //lower priviliges
cat /etc/passwd -----------> it stores the user information
cat /etc/shadow -----------> it stores users password in hash form
man <command> ----------> gives the description regarding utility or commands or
tools
su <user> -------------> to switch the user
grep <fiter_text> <file_name> ------------> to filter the data into a text file
adduser <user_name> --------------------> to create a user
#group
cat /etc/group --------------------> it contains the group information
cat /etc/gshadow -----------------> it contains the group password in hash
#File permission
"used to provide security on files"
#Types of file permission
1- symobolic file permission
2- numeric file permission
3- defualt file permission
#types of permission
1- read -----------------> (r)
2- write ----------------> (w)
3- execution ------------> (x)
#1- symobolic file permission
--- --- ---
user group others
#chmod
chmod <user/group/others> + <permission(r/w/x)> <file/directory> --------> to give
permissions
on file and directory
#2- numeric file permission
read ----------------->4
write ---------------->2
execution ----------->1
permission = 4+2+1=7
max permission =777
n1 ------------> user
n2-------------> group
n3-------------> others
chmod <n1/n2/n3> <file directory> --------> to give permission on files and
directory
#default file permission
umask ---------------> 022
max permission on files = 666
022
default file permission
644
max permission on directories=777
deafule perm of directory = 022
755