Summary of Ubuntu commonly used commands
1. How to switch Ubuntu to root user
sudo su or sudo -i
Log out of the root user
exit
2. mv: move files or folders
There are only four possibilities for moving files and folders:
- Move file to file (file rename)
- Move the file to the folder
- Move folder to folder (folder rename)
- Move the folder to the folder
- mv file name 1 file name 2 (file moved to file (file rename))
![](/img/60924dec9baf4787ae1870925c7f7afa/pl4srxyamp.gif)
- mv file name folder name (file is moved to the folder)
![](/img/60924dec9baf4787ae1870925c7f7afa/r4ibkikdst.gif)
- mv folder name 1 folder name 2 (folder 1 exists) (folder moved to folder (folder rename))
![](/img/60924dec9baf4787ae1870925c7f7afa/70w702tw1m.gif)
- mv folder name 1 folder name 2 (both folders exist) (the folder is moved to the folder)
![](/img/60924dec9baf4787ae1870925c7f7afa/unyv8jvu8t.gif)
3. Delete file: rm
![](/img/60924dec9baf4787ae1870925c7f7afa/iulo4umfur.png)
Continuously updating. . .