LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 10-03-2005, 11:22 AM   #1
rbh123
LQ Newbie
 
Registered: May 2005
Distribution: Redhat
Posts: 25

Rep: Reputation: 15
Setting Environment Variables


If i want to change environment variable HOSTNAME from abc to xyz , how do i do it?
As far as i know if we edit /etc/hosts and /etc/sysconfig/network and then restart the system the new value comes into effect.Is there any other shorcut method to make these changes ?

-rbh
 
Old 10-03-2005, 11:47 AM   #2
Appollo
LQ Newbie
 
Registered: Sep 2005
Location: Sudbury, Ontario, Canada
Distribution: Debian
Posts: 3

Rep: Reputation: 0
Use: hostname *NEWHOSTNAME*

Don't forget that if you wish to make this change permanent to update all other relevant locations.
 
Old 10-03-2005, 07:34 PM   #3
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 51
Changing the hostname with the 'hostname' command like that will only change it until the next reboot. On a lot of distros you change the hostname in the file /etc/sysconfig/network by adding (or editing) the line:
Code:
HOSTNAME=www.example.com
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Environment variables setting... simjii Suse/Novell 4 11-19-2005 08:50 PM
Need help setting environment variables. cottonmouth Linux - Newbie 3 12-09-2004 05:54 PM
setting environment variables jayjoh Linux - Newbie 9 07-12-2004 01:35 PM
setting environment variables durden2.0 Linux - Newbie 5 07-15-2003 02:57 PM
setting environment variables rezza Linux - Distributions 2 04-09-2003 09:21 AM


All times are GMT -5. The time now is 11:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration