Displays files and folders in the current directory.
ls # Basic listing
ls -l # Long listing format
ls -a # Show hidden filesNavigate between folders.
cd /path/to/folder
cd .. # Go up one level
cd ~ # Go to home directoryShows the full path to your current location.
pwdDuplicate files or entire directories.
cp file.txt /new/location/
cp -r folder/ /new/location/Used for moving or renaming files.
mv oldname.txt newname.txt
mv file.txt /new/location/Deletes files or folders permanently.
rm file.txt
rm -r folder/ # Delete a directory and its contentsCreates a new file or updates the timestamp of an existing one.
touch newfile.txtDisplays the entire content of a file.
cat file.txtFor long files, consider using less or more.
Gives you elevated privileges for administrative tasks.
sudo apt update
sudo rm -rf /restricted/areaRequires your user password.
Displays help documentation for commands.
man ls
man grepUse the arrow keys to scroll, and q to quit.
Combine commands with pipes and redirection:
ls -l | grep "filename"
echo "Hello" > file.txt