INODE NUMBER
Friday, 29 July 2022
Basic Commands in Linux PART-7 | RHCSA|Part-10 | Practice in RHEL8 on AWS | Hindi | System Admin
Basic Commands in Linux PART-6 | RHCSA| Part-9 | Practice in RHEL8 on AWS | Hindi | System Admin.
Basic Commands in Linux PART-5 | RHCSA|Part-8 | Practice in RHEL8 on AWS | Hindi | System Admin.
1. COPY(cp) - Used to Copy & Paste
Thursday, 28 July 2022
Basic Commands in Linux PART-4 | RHCSA|Part-7 | Practice in RHEL8 on AWS | Hindi | System Admin.
1. who am i - it show login user
Basic Commands in Linux PART-3 | RHCSA|Part-6 | Practice in RHEL8 on AWS | Hindi | System Admin.
1. ls -l - " -l " is used for more details of files & Directory
-rw-r--r--. 1 root root 01 Jun 1 16:05 file1
drwx------. 2 root root 01 Jun 1 16:05 dir1
d = Directory
- = File
l = Soft Link
1 , 2 = Symbolic Link
root , root = Owner , Group
01 Jun 1 16:05 , 01 Jun 1 16:05 = Last Modified Time & Date
file1 , dir1 = File & Directory Name
2. ln -s = This Command is Used to Create Soft Link ( SHORTCUT ) .
ln -s < Source > < Destination >
3. ln - This Command is Used to Create Hard Link .
ln < Source > < Destination >
Basic Commands in Linux PART-2 | RHCSA|Part-5 | Practice in RHEL8 on AWS | Hindi | System Admin.
1. rm -rf - This Command is Used to Delete any File or Directory Successfully
rm -rf <file or folder name>
2. echo - This Command is Used to Print a String .
echo "String"
3. touch - This Command is Used to Create Empty File
touch <file name>
**** For Multiple Files****
touch <file name> <file name <file name>
4.yum - Yum is a Package Manager in Linux . It is Used to Install Packages ( Software ) in Linux
yum install < Package Name> -y
-y = yes
5. rm dir - This Command is Used to Delete an Empty Directory
rmdir <Directory Name>
6. mkdir -p -MKDIR is used to make Directory but " -p " is used to create Parent Directory
mkdir < Parent Directory name/Directory Name >
7. rm -rf * - This Command is Used to Delete all Stuff
rm -rf *
Basic Commands in Linux PART-1 | RHCSA|Part-4 | Practice in RHEL8 on AWS | Hindi .
1. cat - For Creating File
cat ><filename>
cat >><file name>
cat <file name>
*** Come out of a File Press "CTRL +D"
2. ls - list files & directories
ls
3. cd - change directory
cd .. -- to go back
cd <directory>
4. mkdir - Used to Make Directory
mkdir <directory name>
5. clear - To clear Screen
*** To Clear Screen Press "CTRL +L"
File System in Linux | Short Overview in Hindi.
/USR/LIB = SUPPORTS ALL PLATFORM
/USR/LIB64 = ONLY SUPPORTS 64 BIT
/USR /BIN = NORMAL USER
/USR/SBIN = ADMIN ROOT USER
/VAR = VARIABLE DATA (CACHE , LOGS)
/USR/LIB = SUPPORTS ALL PLATFORM
/USR/LIB64 = ONLY SUPPORTS 64 BIT
/ETC - CONFIGURATION FILES
/DEV = BLOCK DEVICES OR FILES
/HOME/USERNAME = REGULAR USERNAME
/RUN = RUN TIME DATA (PID , LOGS )
/VAR/TMP = (30 DAYS)
/TMP = (10 DAYS)
/ROOT :- ADMIN USER
FOLDER == DIRECTORY
LINUX = CLI
WINDOW=GUI
Wednesday, 27 July 2022
Permissions in Linux PART-3 | RHCSA|Part-26 | Practice in RHEL8 on AWS | Devops & Developer tool
umask (user file-creation mode) is a Linux command that lets you set up default permissions for newly created files and folders. 2. A user-defined permissions 'mask'. A user can choose how to restrict permissions by using a permissions mask.
**By Default Permission set for a file or directory is known as Umask
umask
0022
***Ignore 1st Zero of Umask rest of them is your Default Permission .
****If you want to Calculate the Default Permission of Directory just substract the umask from 777 which is max permission . Then , You Will get Default Permission of Directory.
******If you want to know what will be the Default Permission of file after Creating it . Their is a Simple Trick to follow that is Just Remove Execute Permission from Directory's Permission.
******** You can Set Temporary Umask by running this Command
umask 066
********* But if you Reload your Terminal ( exec bash ) that temporary Value will get Changed
********** You can Set Permanent Umask by going into /etc/bashrc file & setting up their
path of Umask(ROOT USER)- /etc/bashrc
path of umask(Regular User)- /home/Regular user/ . bashrc
Tuesday, 26 July 2022
Permissions in Linux PART-2 | RHCSA|Part-25 | Practice in RHEL8 on AWS | Devops & Developer tool
Universal Permissions
r :- read = 4 r + x = (4+1) = 5 , r + w + x = (4+2+1) = 7 , r + w = (4+2) = 6
w:- write = 2 w + x = (2+1) = 3 , w + r = (2+4) = 6 No Permission = 0
x:- execute = 1
ROOT OR OWNER , GROUP , OTHERS
- rw- r-- r--. 1 root root 0 Jul 1 16:05 .123
d rwx --- ---. 2 root root 29 Jun 30 07:23 .ssh
chmod 664 file1
Directory - r :- If you want to read the content of the Directory.
w :- Create / Modify / Edit in Directory.
x :- To enter in a Directory.
File - r :- To read the file.
w :- Create / Modify /Edit the file
x :- Script or files related to programming
chmod :- Command for change the permission
chmod <Permission> <File or Directory>
Sunday, 24 July 2022
Permissions in Linux PART-1 | RHCSA|Part-24 | Practice in RHEL8 on AWS | Devops & Developer tool
Universal Permissions
r :- read
w:- write
x:- execute
ROOT OR OWNER , GROUP , OTHERS
-rw-r--r--. 1 root root 0 Jul 1 16:05 .123
drwx------. 2 root root 29 Jun 30 07:23 .ssh
Directory - r :- If you want to read the content of the Directory.
w :- Create / Modify / Edit in Directory.
x :- To enter in a Directory.
File - r :- To read the file.
w :- Create / Modify /Edit the file
x :- Script or files related to programming
chmod :- Command for change the permission
chmod <Permission> <File or Directory>
-R :- Recursive :- To change the permission of multiple Directories or files
-v :- Verbose :- It Shows the Task is done.
u :- owner or user o :- others g :- group
+ :- Adding - :- Removing = :- sets Permission exactly
Thursday, 21 July 2022
User Management in Linux PART-6 |RHCSA |Part-23 | Practice in RHEL8 on AWS | Devops & Developer tool
1.useradd -M - This Option is used to create user without creating its directory
useradd -M <username>
*Check by using ls /home this command.
2. useradd -N - This option is used for not creating primary group of a user
useradd -N <username>
**Check by using id <username> Command.
3. useradd -r - This option is Used to Create System User
useradd -r <username>
4. passwd -l - This option is Used to Lock passwd with double "! !" sign
psswd -l <username>
****You can Check by running this command /etc/shadow
5. passwd -u - This option is used to unlock passwd
passwd -u <username>
6. passwd -d - This option used to delete password
passwd -d <username>
7. passwd -e - This option is used to change password whenever user tries to login
passwd -e <username>
8. passwd -n -x -w -i - n stands for minimum days
x stands for maximum days
w stands for warning days
i stands for inactive period
passwd -n 3 -x 4 -w 4 -i 6 <username>
***** You can Check by running /etc/shadow or chage -l Command
User Management in Linux PART-5 |RHCSA |Part-22 | Practice in RHEL8 on AWS | Devops & Developer tool
1.usermod -e - to Set Expiry Date of a User
usermod -e <year-month-date> <username>
*to check this is set or not run Command cat /etc/shadow
2. usermod -f - To set Inactive period after password expiration
usermod -f 2 <username>
3. usermod -l - To Change name of User
usermod -l <new name> <user name>
4. usermod -L - to lock password of a particular User
usermod -L <username>
5. usermod -U - To Unlock Password of a particular user
usermod -U <username>
6. usermod -u - To change UID of a particular user
usermod -u <new id no.> <username>
7. usermod -s - This is Used for Changing Shell
usermod -s <shell> <username>
8. usermod -p <password> <username>
9. how to use multiple options while creating user
* first go in /etc/login.defs
* CREATE_HOME - write 'no' in front of that
useradd -c "comment" -md /home/remoteuser -e 2022-07-31 -G root,vasu -u 1066 -s /sbin/nologin <username>
Monday, 18 July 2022
User Management in Linux PART-4 |RHCSA |Part-21 | Practice in RHEL8 on AWS | Devops & Developer tool
1.userdel- To delete User
userdel <username>
*Linux Will Show Error. If you Add User With same name because some credentials are left in /home/<username> & /var/spool/mail . This Command can only delete stuff from /etc/passwd , /etc/group , /etc/shadow , /etc/gshadow
2. userdel -r - By Using This Command You can delete all files & Directory related to that User. userdel -r <username>
**By running ID Command you can check primary and secondary you can use this command and you can add group by using usermod -G
3. usermod -g - This Command is used for change primary group of a particular user
usemod -g <newuser> <existinguser>
4. useradd -g - This is Used when you want to change user's primary group while creating user.
user -g <group name> <username>
5. groupmod -g - This command is used to change the GID of a User.
groupmod -g <ID> <username>
6. groupmod -n -This command is used to change group name.
groupmod -n <newgroupname> <oldgroupname>
7. groupadd -r - To create System Group.
groupadd -r <groupname>
8. groupdel - It is Used to Delete Group.
groupdel <group name>
9. gpasswd - It is Used for creating passwd
gpasswd <group name>
Basic Commands in Linux PART-3 | RHCSA |Part-6 | Practice in RHEL8 on AWS | Devops & Developer tool.
1. rm -rf <file or folder name>
2. rm -rf *
3. yum update
4.yum install tree
Basic Commands in Linux PART-7 | RHCSA |Part-10 | Practice in RHEL8 on AWS | Devops & Developer tool
1. COPY - cp <souce> <destination>
2. CUT/Paste - mv <source> <destination>
3. RENAME - mv <source> <name>
Basic Commands in Linux PART-8 | RHCSA |Part-11 | Practice in RHEL8 on AWS | Devops & Developer tool
1. who am i - it show user
whoami
2. which - It shows you path
which <package name>
3. --version - <package name> --version
4. --help - it shows you short overview
<cmd> --help
User Management in Linux PART-1 |RHCSA |Part-14 | Practice in RHEL8 on AWS | Devops & Developer tool
UID = User ID
GID = Group ID
Group = 0
1.Regular users = 1000 - 60000
2. System -Users = 1 -200
3. Third Party Users = 201-999
4. adduser <username>
5. passwd <username>
6. passwd lenght = 5
7. passwd expires = 99999(days)
User Management in Linux PART-2 |RHCSA |Part-16 | Practice in RHEL8 on AWS | Devops & Developer tool
PATH - /etc/passwd
vasu:x:1004:1005:vasu is User:/home/vasu:/bin/bash
PATH - /etc/shadow
vasu:ftrd56e657tyf76r6r56e4534ws4rd5656f6767:18983:0:99999:7:::
$ .....SHA512.......$...........Random Salt Value ............$..........Encrypted Password
0 = Time to Change Password
18983 = Showing Last time Changed in Days
99999 = Expiry Date of Password
7 = Warning Days
PATH - /etc/Group
vasu:x:1006
PATH - /etc/gshadow
vasu:password:admin user:members
Thursday, 14 July 2022
User Management in Linux PART-3 |RHCSA |Part-20 | Practice in RHEL8 on AWS | Devops & Developer tool
1. groupadd - To Create Group
groupadd <name of group>
2. user mod - To add User in Particular Group
usermod -G <group name> <username>
usermod -G < Grp1 , Grp2 , Grp3 > <username>
* If you add that particular user to another group it will remove that user from existing group . So , Solution for this Problem is use -a to Append.
usermod -aG <group name> <username>
*If you Want to add Comment at user Credential Location
usermod -c "Hi this is important user" <username>
* If you are Working on AWS Install User Utils
yum install util-linux-user
3. chfn - Change Finger Print Information
chfn -f <name> -o <office no.> -p <phone no.> -h <home no.> <user name>
4. usermod -d - to change path of user
usermod -d /home/userhome <username>
5. chown - to change owner of any file or Directory
chown <new user> <path where files & directories >
6. chgrp - Change group of any file or Directory
chgrp -cv <new group name> <path where files & directories >
7. chown - To Change group & user of file Directory with single Command
chown <user> : <group> <path where files & directories >
8. usermod -md - copy all stuff of old user to new user
user mod -md <path of user> <user>
Wednesday, 13 July 2022
Basic Commands in Linux PART-14 |RHCSA |Part-19 | Practice in RHEL8 on AWS | Devops & Developer tool
1. more - You Can't Revert
more <name>
2. less -You Can Revert
less <name>
11. PIPE - First Cmd OUtput | Second Cmd Input
4. cp -v - copy also prints at same time
cp -v <source> <destination>
5. hostname - prints hostname
hostnamectl set-hostname <name>
6. exec bash - At Run Time Reload Configuration Files
7. uname -a - prints all info related to node
8. uname -n - prints host name
9 . Multiple Command - date ; pwd , ls -al , uname
10. grep - matches pattern
grep <name> <location>
grep -i <name> <location>
grep -iw <name> <location>
grep -v <name> <location>
Tuesday, 12 July 2022
Basic Commands in Linux PART-13 |RHCSA |Part-18 | Practice in RHEL8 on AWS | Devops & Developer tool
1. word count - count word , lines & characters
wc <filename>
11-lines 66- words 126- Characters
* Use ' wc -l' show only lines
* use 'wc -w' shows only words
* Use 'wc -c' shows only characters
* Use 'wc -m' shows bit of character
2. head - to see only top lines
head <file name>
head -n 10 <file name> == to see only top 10 lines
head -10 <file name > == to see only top 10 lines
3. tail - To see bottom lines
tail <file name>
tail -n 6 <file name> == to see only bottom lines
tail -6 <file name> == to see only bottom lines
Basic Commands in Linux PART-12 |RHCSA |Part-17 | Practice in RHEL8 on AWS | Devops & Developer tool
1. vi Editor - This is Editor in Linux.
vi <file name>
* Press 'i' to Insert
* Then Write What you want to Insert
* Press ' Esc ' to Remove Insert Mode
* Press ' : ' + 'w' + 'q' to save & quit
* Press ' : wq' + '!' when you are stuck & not getting out from that file
* Press ' YY' to copy lines
* Press ' p' to print lines
* Press ' nYY' to copy lines n no. of lines & 'p' to print
* Press ' dd' to delete lines
* Press ' ndd' to delete n no. of lines
* Press ' u' to undo printed stuff
* Press ' /<word>' which you want to search in VI Editor
* Press ' : setnumber ' to set line Count
* Press ' : set nonumber ' to remove line count
* Press ' : noh ' to remove highlight
* Press ' : s/<word>/<word should be replaced/g>
* Press ' : s/<word>/<word should be replaced>
Thursday, 7 July 2022
Kubernetes Installation Material ( Control - Plane)
| ===========Kind installation steps============ | |
| curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.8.1/kind-linux-amd64 | |
| chmod +x ./kind | |
| sudo mv ./kind /usr/local/bin/kind | |
| ==========kubectl installation steps============ | |
| curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" | |
| chmod +x ./kubectl | |
| sudo mv ./kubectl /usr/local/bin/kubectl | |
| ============configfile==================== | |
| # three node (two workers) cluster config | |
| kind: Cluster | |
| apiVersion: kind.x-k8s.io/v1alpha4 | |
| nodes: | |
| - role: control-plane | |
| - role: worker | |
| - role: worker | |
| ============create kind cluster============ | |
| kind create cluster --config configfile | |
| If nodes are in NotReady state do below steps | |
| sudo sysctl net/netfilter/nf_conntrack_max=131072 | |
| kind delete cluster | |
| kind create cluster --config configfile
|
-
Running a Container Interactively To use a container interactively requires switches to the run command • -i or --interactive keeps STDIN...
-
Docker • Docker is a very light-weight software container and containerization platform • Docker containers provide a way to run software...
-
Branching in Git • Branching is an integral part of any Version Control(VC) System • Unlike other VC’s Git does not create a copy of exis...