cd — change directory
cd /var/www/adminPanel
cd ..
cd ~
Change the current working directory.
cd .. goes up one level, cd ~ returns home.
Navigate and manage directories and files
cd — change directorycd /var/www/adminPanel
cd ..
cd ~
Change the current working directory.
cd .. goes up one level, cd ~ returns home.
mkdir — make directorymkdir /var/www/newsite
mkdir -p /var/www/website
Create a directory.
-p creates parent folders and won’t overwrite existing ones.
ls — list filesls
ls -l
ls -a
List files and folders.
-l shows details, -a shows hidden files.
Create and inspect files
nano — text editornano /var/www/adminpanel/config.yml
Open the Nano editor.
Exit with CTRL + X, then confirm save.
touch — create filetouch /var/www/file.txt
Create a new empty file or update timestamps.
cat — view filecat /var/www/file.txt
Print file contents to the terminal.
Delete files and directories
rm — removerm file.txt
rm -r directory
Delete files or directories.
⚠ Never use -rf blindly.
rmdir — remove empty dirrmdir emptyfolder
Delete an empty directory.
User rights and access management
sudo — run as rootsudo nano /etc/nginx/nginx.conf
Execute a command with root privileges.
su — switch usersu root
Switch to another user (usually root).
chmod — change permissionschmod 755 file.sh
| Value | Permission |
|---|---|
| 7 | Read + Write + Execute |
| 6 | Read + Write |
| 5 | Read + Execute |
| 4 | Read only |
755 → Owner: rwx, Group: r-x, Others: r-x
Connectivity and HTTP tools
pingping casper-rs.dev
Test network connectivity and latency.
curlcurl https://example.com
Fetch data from an HTTP(S) endpoint.