Skip to main content

How to rename Linux Hostname

CentOS:

Logon to server via putty
Type      vi /etc/hosts      Enter
Press     I
Rename machine and Press escape press Shift colon
Type   wq!      Enter
Type   vi /etc/sysconfig/network   enter
Press i
Rename machine and Press escape press Shift colon
Type   wq!      Enter
service network restart
chkconfig network on
If you want to reboot the server type    init  6
 
*****************************  
Ubuntu:
sudo vim /etc/hostname

Press     I
Rename machine and Press escape press Shift colon
Type   wq!      Enter
Sudo reboot


********************************************  

Comments

Popular posts from this blog

Installing Nagios 4 on Ubuntu 14 04 LTS

AWS Certification Q&A

The AWS Certified Solutions Architect – Associate Level exam is intended for individuals with experience designing distributed applications and systems on the AWS platform. I am listing many sample certification questions and answers while will help to face the certification successfully Keep in mind that the answers for each question might change due to the advancement of AWS and please try to find the answer in more logical manner Answers are below of the page Sample Questions for Amazon Web Services Associate Solutions Architect Certification What does Amazon S3 stand for? A Simple Storage Solution. B Storage Storage Storage (triple redundancy Storage). C Storage Server Solution. D Simple Storage Service. You must assign each server to at least _____ security group A 3 B 2 C 4 D 1 - Before I delete an EBS volume, what can I do if I want to recreate the volume later? A Create a copy of the EBS volume (not a snapshot) B Store a snapshot of the volume C Downlo...