Linux Basics Commands
Linux Basics Commands
CAT: used to create a new file and it is used to open an existing file
Then press enter, it will show an empty file, to edit data press “i” for insert mode, after completion of
editing text to save the file, press Esc+:wq!
*to nullify a file: > filename (if you run this command, it will make the file empty – data in that file will
be erased)
Creating a Directory:
User Administration:
adduser username
*to remove an existing user: userdel -r username (if you are using “-r” option while removing an user, it
will delete the user’s home directory also)
Group Administration:
*to add user to a group: usermod -aG group_name user_name (G - for primary group, g - for
secondary group)
Filter Commands:
*grep: it is used on file, used to filter the file with any keyword: cat filename | grep -i Keyword
*head: it will show the top 10 lines of a file: cat filename | head
Head filename
*tail: it will show bottom 10 lines of a file: cat filename | tail
tail filename
* to check the CPU utilization: top (in top command, you can check CPU, load average and memory
utilization % also )
iostat
Package management:
*package installation can be done by two ways: using yum and rpm
File/Directory permissions:
rwxrwxrwx: here we can devide into 3parts like user, group, others (rwx rwx rwx)
*default directory permissions are: 755
*to change the permissions for file or directory: chmod u,g,o+w file/dir_name (here we are giving
write(w) permission to users,groups,others)
*event management- scheduling meetings with clients/teams, clients data, tickets follow up (L1 support)
*problem management: any incident occurring repeatedly on server, we can treat it as problem. we
need to find out the RCA and do permanent fix
*change management: for any hardware replacements, any configuration changes, OS updates, package
installations we need to create a CHANGE REQUEST
SLA:
p1-Critical, immediate
p3-Medium, 7days
p4-Low, 14days