This README file provides a brief introduction to some essential Linux commands for beginners.
- Navigating the File System
- File Management
- Directory Management
- Permissions
- Viewing File Contents
- System Information
-
To print the current working directory:
pwd -
To change the current working directory:
cd [directory] -
To list the contents of a directory:
ls [options] [directory]
-
To create a new file:
touch [file] -
To copy a file:
cp [source] [destination] -
To move a file:
mv [source] [destination] -
To remove a file:
rm [file]
-
To create a new directory:
mkdir [directory] -
To remove an empty directory:
rmdir [directory] -
To remove a non-empty directory:
rm -r [directory]
-
To change file or directory permissions:
chmod [permissions] [file or directory] -
To change file or directory ownership:
chown [owner] [file or directory]
-
To display the contents of a file:
cat [file] -
To display the first few lines of a file:
head [file] -
To display the last few lines of a file:
tail [file]
-
To display system information:
uname -a -
To display disk usage:
df -h -
To display memory usage:
free -h