Often system administrators need to shutdown/reboot remote Linux systems. This is a problem faced by many new system administrators. In this article, we will learn how to shutdown/reboot remote Linux system.
How to Shutdown/Reboot Remote Linux System
Here are the steps to shutdown/reboot remote Linux system.
1. Log into Remote Server
Open terminal and run the following command to SSH into remote server. Replace user with SSH username, and server-name with the domain name or IP address of remote server.
$ ssh user@server-name
2. Shutdown/Reboot Linux system
Run the following command to shutdown the remote system.
$ sudo shutdown
Run the following command to reboot the remote system.
$ sudo reboot
3. Shortcuts to Shutdown/Reboot remote system
You can combine the remote login and shutdown/reboot in a single command as shown below.
##reboot $ ssh -t user@server-name 'sudo reboot' OR $ ssh -t user@server-name 'sudo halt' ##shutdown $ ssh -t user@server-name 'sudo shutdown -r 0' OR $ ssh -t user@server-name 'sudo shutdown -r now'
In this article, we have learnt how to shutdown/reboot remote Linux server.
Also read:
How to Setup DNS Caching Server in CentOS/RHEL
How to Delete Partition in Linux
How to Backup SAP HANA database
How to Add Multiple Hosts in PHPMyAdmin
Git Compare Difference Between Branches
Related posts:
How to Monitor Disk IO Performance in Linux
SCP command in Linux to copy file from one server to another
How to Reset Root Password in RHEL/CentOS/Fedora Linux
How to Export PostgreSQL Table to CSV
Linux History: Show Commands with Date & Time
How to Deploy React App on NGINX
How to Unrar Multiple Files
How to Return Value in Shell Script Function

Sreeram has more than 10 years of experience in web development, Python, Linux, SQL and database programming.