Linux Commands 101 - n05urpr1532-MHA-Team/PTS-Team GitHub Wiki

.


cd /home/$USER
### Takes you to the current user’s home directory
~
### Takes you to the current user’s home directory
sudo <command>
### execute <command> with root privileges [you will be asked for your password]
mkdir myprettyfolder
### Makes a directory called myprettyfolder (example)
rm file.txt
### Removes a file in the current directory called file.txt
rm -f file.txt
### Removes a file in the current directory called file.txt
### the '-f' flag deletes the file WITHOUT ASKING FOR CONFIRMATION
### '-f' stands for 'force'
rm fi*
### Removes all files that start with fi in the current directory
rm -r fi*
### Removes all files AND DIRECTORIES that start with fi in the current directory
### Contents of directories starting with "fi" will also be removed.
### '-r' means 'recursive'
sudo su
### Switch to root
exit
### Return to your regular user (after using sudo su to become root user)
clear
### Clear the current screen
bash myscript.sh
### Execute the bash script called myscript.sh in current directory
chmod myscript.sh 777
### Allow all permissions for all groups (bad practice)
chmod +x myscript.sh
### Allows the script to be executed when called upon
sudo reboot
### Reboot your server
sudo systemctl status sonarr
### Check on the service called 'Sonarr'
sudo systemctl restart sonarr
### Restarts the service called 'Sonarr'
sudo docker rm -f portainer
### An example of moving a specific container by names
stat /path/to/file
### An example of seeing folder ownership and groups easily

Visit our Webite by Clicking the Picture Below!

N|Demo

N|Solid N|Solid

⚠️ **GitHub.com Fallback** ⚠️