I decided to compose a list of common Linux commands as an easy way to find them.
Please note depending on the Linux installation you may need to run these with an elevated prevailed mode such as root or sudo.
In Ubuntu prefix these command with sudo to run them with elevated privileges. Example: to shutdown your server type: sudo shutdown -h now
Linux Administration:
- Update Ubuntu: sudo apt-get uupgrade
- Update CentOS/Red Hat: yum update
- Shutdown Ubuntu: sudo shutdown -h now
- Shutdown CentOS/Red Hat: shutdown
- Reboot Ubuntu: sudo shutdown -r now
- Reboot CentOS/Red Hat: shutdown -r now
- View IP Address Configuration: ifconfig
Linux File and Folder Management
- View contents in a directory: ls
- View permissions on all contents in a directory: ls -l
- Make a directory: mkdir DirectoryName
- Delete a directory and all contents: rm -rf /path/to/DirectoryName
- Change directories: cd /path/to/DirectoryName
- to change permissions on a file or directory: chmod