forked from plexguide/PlexGuide.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
C - Linux Commands 101
17 lines (16 loc) · 1.01 KB
/
C - Linux Commands 101
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
############# LINUX 101 Commands ############## START
### Written for SUDO Users; if ROOT... remove "sudo"
cd /home/$USER ------ Takes you to the current user’s home directory
~ ----- Takes you to the current user’s home directory
sudo mkdir myprettyfolder ----- Makes a directory called myprettyfolder (example)
sudo rm -r file.txt ----- Removes a file in the current directory called file.txt
sudo rm -r fi* ----- Removes all files that start with fi in the current directory
sudo su ----- Switch to root
exit ----- Return to your regular user (prior to being root user)
clear ----- Clear the current screen
sudo bash myscript.sh ----- Execute the bash script called myscript.sh in current directory
chomd myscript.sh 777 ------ Allow all permissions for all groups (bad practice)
chomd +x myscript.sh ----- Allows the script to be executed when called upon
sudo reboot ----- Reboot your server
sudo docker rm -f portainer ----- an example of moving a specific container by names
############# LINUX 101 Commands ############## END