Hot Downloads

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: How to change localhost name

How to change localhost name 11 years 4 months ago #9179

  • apit
  • apit's Avatar
  • Offline
  • Senior Member
  • Posts: 227
  • Karma: 0
hi there..
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
The administrator has disabled public write access.

How to change username in shell promt 11 years 4 months ago #9183

  • Rocco5757
  • Rocco5757's Avatar
  • Offline
  • New Member
  • Posts: 9
  • Karma: 0
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
The administrator has disabled public write access.

Re: How to change localhost name 11 years 4 months ago #9185

  • sahirh
  • sahirh's Avatar
  • Offline
  • Honored Member
  • Posts: 1700
  • Karma: 0
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).
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
The administrator has disabled public write access.

Re: How to change localhost name 10 years 10 months ago #12726

.. /etc/sysconfig/network
.............................. Huh
The administrator has disabled public write access.

Re: How to change localhost name 10 years 10 months ago #12733

  • monsky
  • monsky's Avatar
  • Offline
  • Distinguished Member
  • Posts: 177
  • Karma: 0
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.
The administrator has disabled public write access.

Re: How to change localhost name 10 years 10 months ago #12734

  • monsky
  • monsky's Avatar
  • Offline
  • Distinguished Member
  • Posts: 177
  • Karma: 0
i forgot .. also you must be 'root' to do that as sahirh has said. :)
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.087 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup