Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-22-2012, 06:07 PM   #1
LQ Newbie
Registered: Oct 2012
Location: South Carolina
Distribution: Ubuntu
Posts: 1

Rep: Reputation: Disabled
Wink Command Line Only -- Changing Hostnames, DNS, Gateway and IP on RHEL 5.6

First, I do not have a GUI Interface and I cannot set a display back for an x-term (Not Allowed), leaving me and Mr. Putty. I need to change the Hostname, IP, and "check" the gateway, subnet mask, DNS, SNMP string, to see if they are correct. I only need the file names I need to modify for a rhel 5.6 server. I went to RedHat and it seems they are most than willing to assist if you have a subscription. I know "vi" and was a Unix Admin a few years back. (OK, it was more than a few and more like a lot of years. HPUX-9 was just out.) Now I find myself needing a list of files for RedHat and a couple of answers. I just need a list of the files like edit the /etc/host file.
I believe I have to take the NIC down?
I believe I am on eth0.
Do I need to modify the route or check it?
How about bouncing the server? (Yes - No - or change Runlevel) I do not have any console access, just ssh and root. If I only need to change the runlevel without console, can I run from a runlevel 3 to a runlever 1 and back with this string: init 1; sleep 15; init 3;sleep 5; echo `runlevel` Without a console, does that work? I know that is a lot of questions so, "Thanks in advance".
Old 10-22-2012, 06:16 PM   #2
Senior Member
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,699
Blog Entries: 23

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Not Allowed this homework???

RHEL is similar to Fedora, I'd look tru that documntation...

Looking on to see where this goes...

Old 10-22-2012, 06:47 PM   #3
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,417

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
1. bookmark and read

2. Try these cmds to get the first few bits of info (I'm hoping this isn't homework ...)
cat /etc/sysconfig/network


route -n
Please clarify what you mean by 'DNS, SNMP string'.


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
[SOLVED] changing keyboardmap from command line yogesh.dhake Linux - Newbie 8 08-25-2011 10:52 AM
looking for modbus TCP to canbus gateway command line tool for linux golden_boy615 Linux - Software 0 05-02-2011 07:31 AM
How to change the hostname, ip, gateway, dns in command line fedora core 6? mrjeffc Linux - Newbie 5 12-20-2006 04:25 AM
How to set Gateway by command line vanhelsing Linux - Networking 1 07-17-2004 12:42 PM
Changing IP, DNS, Gateway, etc... Psykoral Mandriva 2 11-18-2003 11:32 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:08 PM.

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