Difference between revisions of "Hostname, Change Your"

From PCLinuxOSHelp Knowledge Base
Jump to: navigation, search
(Created page with " How To Change your hostname As in most everything in Linux, there are many different ways that you can do something. In this HowTo, I will list just a couple ways that you c...")
 
Line 1: Line 1:
How To Change your hostname
+
=== How To Change your hostname ===
  
 
As in most everything in Linux, there are many different ways that you can do something. In this HowTo, I will list just a couple ways that you can change your hostname.
 
As in most everything in Linux, there are many different ways that you can do something. In this HowTo, I will list just a couple ways that you can change your hostname.
Line 5: Line 5:
 
First we will look at changing our hostname using PCC (The PCLOS Control Center)
 
First we will look at changing our hostname using PCC (The PCLOS Control Center)
  
In your task bar look for the PCC logo Pcc.png Click on it to open PCC
+
In your task bar look for the PCC logo [[file:Pcc.png]] Click on it to open PCC
  
 
+
[[file:Open-pcc.png]]
Open-pcc.png
 
  
  
Line 14: Line 13:
  
  
Select-network-and-hostname.png
+
[[file:Select-network-and-hostname.png]]
  
  
It will open a window that will display the current information. There should be two entries displayed. We are only interested with the first entry "localhost.localdomain"
+
It will open a window that will display the current information. There should be two entries displayed. We are only interested with the first entry ''"localhost.localdomain"''
  
  
Host-definitions.png
+
[[file:Host-definitions.png]]
  
  
Line 26: Line 25:
  
  
Host-definitions-modify.png
+
[[file:Host-definitions-modify.png]]
  
  
 
The only changes we want to make in this box is to the "Host Name" and the "Host Aliases" lines.
 
The only changes we want to make in this box is to the "Host Name" and the "Host Aliases" lines.
  
In the "Host Name" line add the name you are going to use. As for my example I am using workbox
+
In the "Host Name" line add the name you are going to use. As for my example I am using '''workbox'''.
  
  
Make-changes.png
+
[[file:Make-changes.png]]
  
  
 
My entry should now look like this
 
My entry should now look like this
  
    workbox.localhost.localdomain
+
'''''workbox.localhost.localdomain'''''
  
 
In the "Host Aliases" line, which should be blank I enter my hostname. Again in my example I entered
 
In the "Host Aliases" line, which should be blank I enter my hostname. Again in my example I entered
  
    workbox
+
'''''workbox'''''
  
 
When you have finished, click "OK" The window will close. You should notice that your host name has now changed.
 
When you have finished, click "OK" The window will close. You should notice that your host name has now changed.
  
  
Changes-made.png
+
[[file:Changes-made.png]]
  
  
Line 55: Line 54:
 
We can now close out the PCC window.
 
We can now close out the PCC window.
  
You have now changed your hostname. Be aware that your changes WILL NOT show up till after you restart your computer.
+
You have now changed your hostname. Be aware that your changes '''''WILL NOT''''' show up till after you restart your computer.
  
 
+
=== Changing Your Hostname yet another way ===
 
 
 
 
 
 
Changing Your Hostname yet another way
 
  
 
From your desktop press the "Alt" key and "F2" key. This will open a window at the top of you screen.
 
From your desktop press the "Alt" key and "F2" key. This will open a window at the top of you screen.
  
  
Run-command.png
+
[[file:Run-command.png]]]
  
  
 
In the line enter
 
In the line enter
  
kdesu kwrite
+
'''''kdesu kwrite'''''
  
  
Enter-command.png
+
[[file:Enter-command.png]]
  
  
Line 80: Line 75:
  
  
Dialogbox.png
+
[[file:Dialogbox.png]]
  
  
Line 86: Line 81:
  
  
Enter-password.png
+
[[file:Enter-password.png]]
  
  
Line 92: Line 87:
  
  
Kwrite-opens.png
+
[[file:Kwrite-opens.png]]
  
  
 
Click on the "OPEN" button and open the following file.
 
Click on the "OPEN" button and open the following file.
  
/etc/sysconfig/network
+
''/etc/sysconfig/network''
  
  
Select-file.png
+
[[file:Select-file.png]]
  
  
 
We are only interested in on line in this file. This is the first line starting with
 
We are only interested in on line in this file. This is the first line starting with
  
HOSTNAME=localhost.localdomain
+
'''''HOSTNAME=localhost.localdomain'''''
  
 
Now we want to change it to reflect our new hostname. In this example we want to change it to read.
 
Now we want to change it to reflect our new hostname. In this example we want to change it to read.
  
HOSTNAME=workbox.localhost.localdomain
+
'''''HOSTNAME=workbox.localhost.localdomain'''''
  
  
Edit-file.png
+
[[file:Edit-file.png]]
  
  
Named-changed.png
+
[[file:Named-changed.png]]
  
  
 
When you have finished click on "SAVE" Once saved you can than close your editor. Your changes will now take effect the next time you reboot your computer.
 
When you have finished click on "SAVE" Once saved you can than close your editor. Your changes will now take effect the next time you reboot your computer.
Category: HowTo
+
 
 +
 
 +
 
 +
 
 +
[[category:HowTo]]

Revision as of 23:25, 16 April 2018

How To Change your hostname

As in most everything in Linux, there are many different ways that you can do something. In this HowTo, I will list just a couple ways that you can change your hostname.

First we will look at changing our hostname using PCC (The PCLOS Control Center)

In your task bar look for the PCC logo Pcc.png Click on it to open PCC

Open-pcc.png


In the left hand pane click on "Network & Internet" than in the right hand pane select "Host Definitions"


Select-network-and-hostname.png


It will open a window that will display the current information. There should be two entries displayed. We are only interested with the first entry "localhost.localdomain"


Host-definitions.png


Click on that entry to highlight it and than click on the "Modify" button to the right side of the window. This will open a "Modify Entry" box.


Host-definitions-modify.png


The only changes we want to make in this box is to the "Host Name" and the "Host Aliases" lines.

In the "Host Name" line add the name you are going to use. As for my example I am using workbox.


Make-changes.png


My entry should now look like this

workbox.localhost.localdomain

In the "Host Aliases" line, which should be blank I enter my hostname. Again in my example I entered

workbox

When you have finished, click "OK" The window will close. You should notice that your host name has now changed.


Changes-made.png


If everything is correct than click "OK" at the bottom left of the window. If something is not right repeat the above process till it is correct.

We can now close out the PCC window.

You have now changed your hostname. Be aware that your changes WILL NOT show up till after you restart your computer.

Changing Your Hostname yet another way

From your desktop press the "Alt" key and "F2" key. This will open a window at the top of you screen.


Run-command.png]


In the line enter

kdesu kwrite


Enter-command.png


or use your favorite text editor. When you are finished press enter. After a few moments, you should than be greeted with a password dialog box.


Dialogbox.png


In this box enter your root users password, when you are done press OK.


Enter-password.png


Your text editor should now open. In our example "kwrite" will open.


Kwrite-opens.png


Click on the "OPEN" button and open the following file.

/etc/sysconfig/network


Select-file.png


We are only interested in on line in this file. This is the first line starting with

HOSTNAME=localhost.localdomain

Now we want to change it to reflect our new hostname. In this example we want to change it to read.

HOSTNAME=workbox.localhost.localdomain


Edit-file.png


Named-changed.png


When you have finished click on "SAVE" Once saved you can than close your editor. Your changes will now take effect the next time you reboot your computer.