100 Linux Commands
100 Linux Commands
100 Linux Commands
File Operations:
ls: Lists all files and directories in the present working directory
ls -R: Lists files in sub-directories as well
ls -a: Shows hidden files
ls -al: Lists files and directories with detailed information like
permissions, size, owner, etc.
cd directoryname: Changes the directory
cd ..: Moves one level up
pwd: Displays the present working directory
cat > filename: Creates a new file
cat filename: Displays the file content
cat file1 file2 > file3: Joins two files (file1 and file2) and stores the
output in a new file (file3)
touch filename: Creates or modifies a file
rm filename: Deletes a file
cp source destination: Copies files from the source path to the
destination path
mv source destination: Moves files from the source path to the
destination path
find / -name filename: Finds a file or a directory by its name starting
from root
file filename: Determines the file type
less filename: Views the file content page by page
head filename: Views the first ten lines of a file
tail filename: Views the last ten lines of a file
lsof: Shows which files are opened by which process.
du -h --max-depth=1: Shows the size of each directory. Use --max-
depth=1 to limit the output to the current directory and its
immediate children.
fdisk: Disk partition manipulation command.
2. Directory Operations:
3. Process Operations:
4. File Permissions:
1. Text Processing:
2. Disk Usage:
3. System Info:
7. Environment Variables:
13. Others:
Remember, you can always use the man command (e.g. man ls) to
get more information about each command.