- ls
- pwd
- mkdir
- rmdir
- touch
- cd
- cd ..
- list file details
- list hidden files
- Renaming
- Move files
- Copy a file
- Copy a directory
- file permission
- find files
- using curl
- update packages
- Restarting
- Compress to zipfile
- Extract zipfile
- open
- clear
- nano
- whoami
- grep
Lists files and directories in the current directory.
lsDisplays the current working directory.
pwdCreates a new directory.
mkdir /directory-path/directory-nameRemoves an empty directory.
rmdir /director-path/directory-nameCreates an empty file or updates the timestamp of an existing file.
touch file-nameChanges the current working directory.
cd /directory-pathMoves one directory up.
cd ..Lists all files, including hidden files.
ls -aLists files in long format with detailed information.
ls -lRenames a file.
mv oldname.txt newname.txtMoves a file to a different directory.
mv file.txt /directory-path-we-want-to-moveCopies a file from one location to another.
cp source.txt destination.txtCopies the entire directory /source_dir and its contents (including subdirectories) to /dest_dir
cp -r /source_dir /dest_dirChanges file permissions recursively to allow full read, write, and execute access to all users.
sudo chmod -R 777 /pathFinds files with a specific pattern in a directory.
find /path -name "*.txt" Downloads a file from a URL.
curl -O http://example.com/file.zipUpdates the package list on Ubuntu/Debian-based systems.
sudo apt updateReboots the system.
sudo rebootCompresses a file into a zip archive.
zip [zip-name] [the-file-name-you-want-to-compress]Extracts files from a zip archive.
unzip [zip-file-name]Open a file.
open filenameThe clear command is used to clear the terminal screen
clearit opens for editing. If it doesn't exist, nano creates a new file.
nano file-nameIt print the current username
pwdThe grep command searches for a specific pattern (text) within files or output and displays matching lines.
grep "hello" file.txt