• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Linux Tcp/ip config

Bud Guy

Senior member
What file and command do I need to set a systems ip in linux via a cmd prompt?

I've poked around but didn't find it. The linux box is red hat... can't remember the version of the top of my head though? I'm sure there a file that defines the ip, netmask, subnet mask, dns, blah...blah...blah.

Thanks in advance!
 
Ultimately, all networking is set up through ifconfig and route, but you generally don't run those commands manually. In Red Hat, you'll want to use their graphical networking setup tool if you've got an X display. If you're command-line only, you can run a stripped-down text version using netconfig. It's simple, but has all the basics.

If, for some reason, you don't want to use those tools (which are the recommended way to do things) there are text files somewhere in /etc (maybe /etc/default/networking?) that provide that information. But it's really easier to use the tools.

edit: added the bit about route
 
in RH9, it is in /etc/sysconfig/networking/profiles/default, listed as ifcg-eth0 or whatever your ethenet adapter's ID is.
resolv.conf is also in that directory, as well as the hosts file
 
Thanks guys... 1 More question. I've found the ifcg-eth0 files that I need to modify, now if you don't mind what is the correct way to edit this file? do I do a vi? Anyone have any useful links to using vi if so?

Thanks a million! Shane
 
vi/vim is recommended since it's on every unix system. If you don't know it and you have vim installed run 'vimtutor'.
 
I love VI....I even got vi for windows....I had to search/replace a huge number of times on huge text files (like 150 MB+) And notepad was taking FOREVER(read 45 minutes)....winVI, 2 minutes.
 
Back
Top