My Blog
Ubuntu Server Basic Console Commands
- October 6, 2019
- -
- Linux Virtual & Dedicated server
- -
- nicolas
Hi, as I've mentioned in another article, because of my job as a web developer, I have very little time for posts and videos.
It goes without saying that when I get time I will upload all of my archive I have created from time to time to troubleshoot problems that every company faces in its day to day life, from almost free cloud setup to multiple e-shop automations and more, as well as computerization.
Today, I am giving you my personal Ubuntu Server master command file that I had made for Ubuntu Server in Google Cloud (I will be uploading videos for $ 300 free Virtual Private Server to Google Cloud and how to claim it, setup, settings etc)
Note that some commands may not have the sudo up front, so add it or get admin rights with sudo su - on the console to prevent it from being used.
Οι εντολές: 01. Upgrading software sources: sudo apt-get update 02. Software update: sudo apt-get upgrade 03. Upgrade operating system: sudo apt-get dist-upgrade 04. Upgrade operating system...: && (πχ εντολή && εντολή) 05. Refresh web server: sudo /etc/init.d/apache2 reload ή sudo service apache2 reload 06. Restart server: sudo shutdown -r now ή sudo reboot 07. Off server: sudo poweroff 08. Edit File (Document): sudo nano eggrafo_path 09. Delete completely eg: sudo apt-get remove -y onoma* && apt-get purge -y onoma* && apt autoremove 10. Download file: wget link_arxeiou 11. Install deb file with command line: sudo dpkg -i DEB_PACKAGE 12. Uninstalling a deb file: sudo dpkg -r PACKAGE_NAME 13. Configure deb file again: sudo dpkg-reconfigure PACKAGE_NAME 14. Show files & folders: ls -R 15. Show files & folders on a specific path: ls -R /var (το var είναι παραδειγμα φακέλου) 16. Show files & folders you don't have access to: sudo ls -R /root (χρησιμοποιούμε το sudo) 17. Rename or& moving files & φακέλων: mv "old location" "new location" for multiple files: mv file1 file2 file3 -t DESTINATION for all files & folders: mv /phgh/* /proorismos/ 18. Delete files: rm -f filename 19. Copy files: cp (-i or -b) /media/sda3/SkyDrive/untitelds.mpg /home/levan/kdenlive By using -i for interactive you will be asked if you would like to replace the file or you can use -b to create a backup of your file 20. File compression: zip -r my_arch.zip my_folder 21. Decompression file: unzip file.zip -d destination_folder decompression tar.gz file: tar -xvzf arxeio.tar.gz 22. Creating a folder: mkdir onoma 23. File rights: sudo chown -R username:group directory (will change ownership (both user and group) of all files and directories inside of directory and directory itself.) sudo chown username:group directory (will only change the permission of the folder directory but will leave the files and folders inside the directory alone.) view all users: compgen -u view all groups: compgen -g 24. Rights chmod: all directories inside a folder to 755: drwxr-xr-x 4 is read 5 is read/execute (execute is always needed for directories) 6 is read/write 7 is read, write, and execute The first number is Owner, the second is Group, and the third is Other. Thus 644 is sudo chown -R www-data:www-data wp-content/uploads/ 25. Connect as root: sudo su -
This post is also available in: Ελληνικά