Linux Basic Commands
1. Navigation Commands
-
pwd– Display current working directory. -
ls– List files and directories. -
cd– Change directory. -
cd ..– Move to parent directory. -
cd ~– Move to home directory.
2. File and Directory Commands
-
mkdir– Create a new directory. -
touch– Create a new file. -
rm– Remove a file. -
rmdir– Remove an empty directory. -
cp– Copy files or directories. -
mv– Move or rename files. -
cat– Display file contents.
3. File Viewing Commands
-
head– Display first 10 lines. -
tail– Display last 10 lines. -
less– View file contents page by page. -
more– View file contents page by page. -
clear– Clear terminal screen.
4. System Information Commands
-
whoami– Display current username. -
date– Display current date and time. -
cal– Display calendar.
5. File Permissions
-
chmod– Change file permissions. -
chown– Change file ownership. -
ls -l– Display file permissions.
