diff options
author | Aaron Ball <nullspoon@iohq.net> | 2015-06-01 21:53:17 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@iohq.net> | 2015-06-28 14:41:14 -0600 |
commit | 6d041cdc56d8551c57780f198f0f8b4a37665ae6 (patch) | |
tree | 446adf3c3d27af0966ff5600441620686792f8ab /src/Changing_the_Hostname_on_a_Linux_Box.ascii | |
parent | dc8f226be5aca4718ea5e5798aebd96e88a8898f (diff) | |
download | oper.io-6d041cdc56d8551c57780f198f0f8b4a37665ae6.tar.gz oper.io-6d041cdc56d8551c57780f198f0f8b4a37665ae6.tar.xz |
Updated a few more posts
Diffstat (limited to 'src/Changing_the_Hostname_on_a_Linux_Box.ascii')
-rw-r--r-- | src/Changing_the_Hostname_on_a_Linux_Box.ascii | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/Changing_the_Hostname_on_a_Linux_Box.ascii b/src/Changing_the_Hostname_on_a_Linux_Box.ascii new file mode 100644 index 0000000..7ea649a --- /dev/null +++ b/src/Changing_the_Hostname_on_a_Linux_Box.ascii @@ -0,0 +1,58 @@ +Changing the Hostname on a Linux Box +==================================== +:author: Aaron Ball +:email: nullspoon@iohq.net + + +== {doctitle} + +I recently had need to change a server name due to a change in our server +naming scheme (local ski resorts to breweries). For the simple comedy of the +naming scheme switch, here's how it currently looks (without server prefixes +for security purposes of course). If you just want the solution, skip down a +paragraph. + +Our current environment is mostly virtualized. The hosts are named after +breweries and their virtual guests are named after the beers that each brewery +produces. Clever, yeah? I can already feel my morale rising. + + + +First off, open up a terminal window + +image:files/terminal001.png[height=400] + +Then type + +image:files/terminal002b.png[height=200] + +The file that comes up should contain nothing but a hostname. In my case this +is . (Ctrl + x closes the file, y says to save the file before closing, Enter +saves the file under the original filename). + +image:files/terminal003.png[height=300] + +Once you've done this, all you need to do is restart your computer and you +should be golden. + +Here's how we fix the aforementioned issue. + +If you've closed your terminal for the restart, open it up again. Type *sudo +nano /etc/hosts* + +image:files/terminal004.png[height=300] + +At the top you should see 127.0.0.1, 127.0.1.1 and their associated +'hostnames'. The one to the right of 127.0.1.1 should show your old hostname. +Change that to the new hostname and save the file (Press Ctrl + x -> y -> +Enter). Now your computer's IP address should resolve to its new hostname. + +Enjoy! + +Now for a cup of joe... + + +Category:Linux + + +// vim: set syntax=asciidoc: |