How to Ubuntu server terminal console

At this moment I live in Vietnam. We have apartment with internet access which runs trough another router and ..it is complicated. Anyway I can’t use FileZilla or similar software to work on my server which doesn’t have any control panels. Therefore I have to use console commands.

After login become a root user: sudo su
navigate to a folder: cd /foldername
– if you want to go deeper then use: cd foldername
make a folder: sudo mkdir /parentfolder/foldername
– or if you want to make a folder in current directory: sudo mkdir foldername
change permission: sudo chmod 775 yourdirectory
delete a folder and everything in it: rm -rf foldername
delete everything in the folder, but not the folder itself:rm -rf /path/*
look at the file contents with: sudo ls -lha /path/
to just rename a file or directory type thismv /home/user/oldname /home/user/newname
move a file: mv file_name ~/destination
move a folder: mv -R directory_name ~/destination
create zip file by running: zip -r compressed_filename.zip foldername
decompress ZIP file: unzip file.zip -d destination_folder
copy a directory or a file: cp -r /home/USER/folder /media/usb_stick/backup/folder
Restart services: sudo service SERVICENAME restart
– if you are on Serverpilot (like me) then the service names are nginx-sp, apache-sp, and phpX.Y-fpm-sp, where X.Y is the PHP version
Use unzip file.zip to extract a zip file and tar xzf file.tar.gz to extract a tar.gz file.

More from author

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Related posts

Latest posts

Winamp is the best music player for Windows PC

Winamp, it really whips the llama's ass! 🙂 The best music player of all time.Old school people should know why. My first music player is...

Preload, DNS Prefetch, Preconnect

Find out what does Preload, DNS Prefetch an Preconnect functions are, how they differ from each other and where to use them.

All in One SEO Pack Pro vs Yoast SEO Pro

The ultimate comparison: All in One SEO pack Pro vs Yoast SEO Pro. Find out which one is the best in the year 2020.