By: Jason in Cloud Tutorials on 2020年06月01日 [フレーム]
To change the hostname from an SSH terminal, follow these steps:
Log in to your server via SSH using a user with root or sudo privileges.
Open the file /etc/hostname in a text editor. For example:
sudo nano /etc/hostname
Replace the existing hostname with the new hostname that you want to set. Save and close the file.
Open the file /etc/hosts in a text editor. For example:
sudo nano /etc/hosts
Find the line that contains the old hostname and replace it with the new hostname. Save and close the file.
Reboot the server for the changes to take effect. You can do this by running the command:
sudo reboot
After the reboot, your server will use the new hostname.
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Most Viewed Articles (in Cloud )
Power On a VM from ESXI command line
HA and DR in a cloud environment such as Amazon EC2
Application Security in a cloud environment such as Amazon EC2
How to get the API key for CloudStack
Security and Privacy Management in the Cloud
Backup and recovery in a cloud environment such as Amazon EC2
How to change the virtual machine name in Azure
Latest Articles (in Cloud)
Power On a VM from ESXI command line
How to change the virtual machine name in Azure
Install OpenStack step by step guide
How to get the API key for CloudStack
HA and DR in a cloud environment such as Amazon EC2
Backup and recovery in a cloud environment such as Amazon EC2
Application Security in a cloud environment such as Amazon EC2
Power On a VM from ESXI command line
How to change the virtual machine name in Azure
Install OpenStack step by step guide
How to get the API key for CloudStack
HA and DR in a cloud environment such as Amazon EC2
Backup and recovery in a cloud environment such as Amazon EC2
Application Security in a cloud environment such as Amazon EC2
© 2023 Java-samples.com
Tutorial Archive: Data Science React Native Android AJAX ASP.net C C++ C# Cocoa Cloud Computing EJB Errors Java Certification Interview iPhone Javascript JSF JSP Java Beans J2ME JDBC Linux Mac OS X MySQL Perl PHP Python Ruby SAP VB.net EJB Struts Trends WebServices XML Office 365 Hibernate
Latest Tutorials on: Data Science React Native Android AJAX ASP.net C Cocoa C++ C# EJB Errors Java Certification Interview iPhone Javascript JSF JSP Java Beans J2ME JDBC Linux Mac OS X MySQL Perl PHP Python Ruby SAP VB.net EJB Struts Cloud Computing WebServices XML Office 365 Hibernate