- Posts: 227
- Thank you received: 0
How to change localhost name
19 years 4 months ago #9179
by apit
How to change localhost name was created by apit
hi there..
which file need to be modify to change localhost at shell promt
example:
i've try edit file /etc/host but it will disappear when reboot the pc..need your guide..thanks
which file need to be modify to change localhost at shell promt
example:
[localhost@localdomain]#
change to
[apit@apit]#
i've try edit file /etc/host but it will disappear when reboot the pc..need your guide..thanks
19 years 4 months ago #9183
by Rocco5757
Replied by Rocco5757 on topic How to change username in shell promt
hai,
this is ballu.i think the way to change the username i.e is LOGNAME is through vi ~/.bash_profile and editing the environment variables.And other may goto /etc and type 'vi passwd' change the user name and what ever u want there in the list and save the changes.i think it should work.
bye
balluf
this is ballu.i think the way to change the username i.e is LOGNAME is through vi ~/.bash_profile and editing the environment variables.And other may goto /etc and type 'vi passwd' change the user name and what ever u want there in the list and save the changes.i think it should work.
bye
balluf
19 years 4 months ago #9185
by sahirh
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
Replied by sahirh on topic Re: How to change localhost name
I quote from 'man hostname'
NAME
hostname - show or set the system's host name
dnsdomainname - show the system's DNS domain name
SYNOPSIS
hostname [-v] [-a] [-d] [-f] [-i] [-s]
[-y]
hostname [-v] [-F filename] [hostname]
hostname [-v] [-h] [-V]
dnsdomainname [-v]
DESCRIPTION
Hostname is used to either set or display the current host or domain name of the system.
This name is used by many of the networking programs to identify the machine. The domain
name is also used by NIS/YP.
GET NAME
When called without any arguments, the program displays the current names:
hostname will print the name of the system as returned by the gethostname(2) function.
dnsdomainname will print the domain part of the FQDN (Fully Qualified Domain Name). The com-
plete FQDN of the system is returned with hostname --fqdn.
SET NAME
When called with one argument or with the --file option, the commands set the host name or
the NIS/YP domain name.
Note, that only the super-user can change the names.
It is not possible to set the FQDN or the DNS domain name with the dnsdomainname command
(see THE FQDN below).
NAME
hostname - show or set the system's host name
dnsdomainname - show the system's DNS domain name
SYNOPSIS
hostname [-v] [-a] [-d] [-f] [-i] [-s]
[-y]
hostname [-v] [-F filename] [hostname]
hostname [-v] [-h] [-V]
dnsdomainname [-v]
DESCRIPTION
Hostname is used to either set or display the current host or domain name of the system.
This name is used by many of the networking programs to identify the machine. The domain
name is also used by NIS/YP.
GET NAME
When called without any arguments, the program displays the current names:
hostname will print the name of the system as returned by the gethostname(2) function.
dnsdomainname will print the domain part of the FQDN (Fully Qualified Domain Name). The com-
plete FQDN of the system is returned with hostname --fqdn.
SET NAME
When called with one argument or with the --file option, the commands set the host name or
the NIS/YP domain name.
Note, that only the super-user can change the names.
It is not possible to set the FQDN or the DNS domain name with the dnsdomainname command
(see THE FQDN below).
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
- linuxmanju
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
18 years 9 months ago #12726
by linuxmanju
Replied by linuxmanju on topic Re: How to change localhost name
.. /etc/sysconfig/network
.............................. Huh
.............................. Huh
18 years 9 months ago #12733
by monsky
Replied by monsky on topic Re: How to change localhost name
same with linuxmanju.. edit the /etc/sysconfig/network.. then /sbin/service network restart to take effect and log on again. you will see the changes.
Time to create page: 0.135 seconds