-
Notifications
You must be signed in to change notification settings - Fork 0
Helpful linux commands
sudo shutdown now #Shutdown
sudo rebooot #Reboot
sudo halt #Works like shutdown
cd <foldername> #Make folder current
ls #View files and folders list in current directory
mkdir <foldername> #Create folder
rm -r <foldername> #Remove folder
sudo cp <sourcefilename> <destinationfilename> #Copy file to destination folder
journalctl -xe #View system log
dmesg #View system output console
netstat -an #Look used ports
sudo apt-get update #Update packages list
sudo apt-get dist-upgrade #Upgrade installed packages
wget https://linktopackage/packagename.deb #Download package and save package into current directory
sudo dpkg -i packagename.deb #Install software from the package
passwd #Change password
sudo passwd root #Enable root access
sudo adduser <username> <groupname> #Add user into group
groups <username> #View groups list for user
sudo chmod 774 scriptname.py #Add executable permissions for some python script
sudo pkill -f scriptname.py
sudo systemctl enable <servicename>
sudo systemctl disable <servicename>
sudo systemctl start <servicename>
sudo systemctl status <servicename>
sudo systemctl stop <servicename>
sudo systemctl restart <servicename>
sudo systemctl daemon-reload