Linux Command Explanations
ls
Lists all files and directories in the current directory.
Example: ls -l (lists all contents in long format including permissions, size, and modification
date)
rmdir
Removes an empty directory.
Example: rmdir example_directory (removes a directory named example_directory if it is
empty)
cat
Concatenates and displays the content of files.
Example: cat file.txt (displays the content of file.txt)
mkdir
Creates a new directory.
Example: mkdir new_directory (creates a new directory called new_directory)
pwd
Prints the current working directory.
Example: pwd (displays the path of the current directory)
cd
Changes the directory.
Example: cd /home/user (changes the current directory to /home/user)
chgrp
Changes the group ownership of a file or directory.
Example: chgrp group_name file.txt (changes the group ownership of file.txt to group_name)
chmod
Changes the permissions of a file or directory.
Example: chmod 755 file.txt (sets the permissions of file.txt to read, write, and execute for
the owner, and read and execute for group and others)