Module 4 - Linux Fundamentals🌀.

Table of contents
- ➡️Command Syntax.
- ➡️Files and directory permissions(chmod).
- ➡️Permissions using numeric mode.
- ➡️File Ownership Commands(chown, chgrp).
- ➡️Access Control List (ACL).
- ➡️Help Commands.
- ➡️TAB Completion and Up Arrow Keys.
- ➡️Adding Text to FIles.
- ➡️Standard Output to a command.
- ➡️File Maintenance Commands.
- ➡️File Display Commands.
- ➡️Cut - text processors commands.
- ➡️awk - text processors commands.
- ➡️grep/egrep - text processors commands.
- ➡️sort/uniq - text processors commands.
- ➡️wc - text processors commands.
- ➡️compress and un-compress.
- ➡️Linux vs Windows Commands.

➡️Command Syntax.
➡️Files and directory permissions(chmod).
how to remove or add permission?
➡️Permissions using numeric mode.
➡️File Ownership Commands(chown, chgrp).
➡️Access Control List (ACL).
What is ACL?
- ACL provides an additional, more flexible permission mechanism for file systems. It is designed to assist with UNIX file permissions. ACL allows you to give permissions for any user or group to any disc resource.
Use of ACL:
- Think of a scenario in which a particular user is not a member of group created by you but still you want to give some read or write access, how can you do it without making user a member of group, here comes in pictures Access Control Lists, ACL helps us to do this trick.
- Basically, ACLs are used to make a flexible permission mechanism in Linux.
- From Linux man pages, ACLs are used to define more fine-grained discretionary access rights for files and directories.
- Commands to assign and remove ACL permissions are:
setfacl and getfacl
List of commands for setting up ACL.
Display the ACL of a file or directory:
getfacl filename
Add or modify ACL entries:
For specific user:
setfacl -m u:username:permissions filename
For a specific group:
setfacl -m g:groupname:permissions filename
Remove a specific ACL entry:
For a user:
setfacl -x u:username filename
For a group:
setfacl -x g:groupname filename
Remove all ACL entries from a file or directory:
setfacl -b filename
➡️Help Commands.
➡️TAB Completion and Up Arrow Keys.
➡️Adding Text to FIles.
➡️Standard Output to a command.
tee filename
→ Writes output to file (overwrites existing content).tee -a filename
→ Writes output to file (appends to existing content).cat filename
→ Displays file content.
➡️File Maintenance Commands.
Command | Description |
cp | Copies files and directories |
rm | Deletes files and directories (rm -r for directories) |
mv | Moves or renames files and directories |
mkdir | Creates a directory |
rmdir | Removes an empty directory (rm -r for non-empty) |
chgrp | Changes the group ownership of a file/directory |
chown | Changes the owner and/or group of a file/directory |
➡️File Display Commands.
Command | Description |
cat | Displays the entire file content |
more | Displays file content page by page (forward only) |
less | Displays file content page by page with scrolling (forward and backward) |
head | Shows the first 10 lines of a file (customizable) |
tail | Shows the last 10 lines of a file (customizable, can track changes with -f ) |
➡️Cut - text processors commands.
➡️awk - text processors commands.
➡️grep/egrep - text processors commands.
➡️sort/uniq - text processors commands.
➡️wc - text processors commands.
➡️compress and un-compress.
Command | Description |
tar -cvf archive.tar file_or_directory | Create an uncompressed archive |
tar -xvf archive.tar | Extract an uncompressed archive |
tar -czvf archive.tar.gz file_or_directory | Create a compressed .tar.gz archive |
tar -xzvf archive.tar.gz | Extract a .tar.gz archive |
tar -tvf archive.tar.gz | List contents of a .tar.gz file |
gzip filename | Compress a file (filename → filename.gz ) |
gzip -d filename.gz or gunzip filename.gz | Decompress a .gz file |
➡️Linux vs Windows Commands.
(If you have any questions or face issues, feel free to drop a comment below or mail me at birendra2783@gmail.com or watsapp msg on +977 9821508997)
Subscribe to my newsletter
Read articles from Birendra Kumar Chaudhary directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Birendra Kumar Chaudhary
Birendra Kumar Chaudhary
🌐 DevOps Enthusiast | Cloud & System Administrator | WordPress Expert With 2+ years of experience, I specialize in cloud infrastructure, server management, and WordPress development. At Appharu PVT. LTD., I optimize systems, reduce costs, and implement monitoring solutions. Experienced in deploying 50+ WordPress sites, AWS S3 integration, and troubleshooting technical issues, I’m focused on performance, security, and continuous learning in DevOps and automation.