Could any one tell me how to assign IP to a linux box.

Thread Tools Search this Thread
Operating Systems Linux Red Hat Could any one tell me how to assign IP to a linux box.
# 1  
Old 03-09-2014
RedHat Could any one tell me how to assign IP to a linux box.

Hi All,

Could any one please help me how to assign IP to a linux box permanently.

IP should not be changed even after Rebooting the machine.SmilieSmilieSmilie
# 2  
Old 03-10-2014
Depends on the flavour of Linux you are using:
RedHat/CentOS: modify the file /etc/sysconfig/network-scripts/ifcfg-eth0
Debian: modify the file /etc/network/interfaces
This User Gave Thanks to stdlib For This Post:
# 3  
Old 03-10-2014
That worked up to RedHat 6.0. The next version of RedHat that I used is 6.4. On 6.4 it is now /etc/sysconfig/network-scripts/ifcfg-em1. I do not know which release between 6.0 and 6.4 started this.

After you make the change to your network file you can do:
service network restart

to set the new IP address without an immediate reboot. Or just reboot if you want.
# 4  
Old 03-10-2014
RHEL 6.3 which we have is still using ifcfg-ent0

# 5  
Old 03-10-2014
FWIW, In RHEL 6.5 here, it is still ifconfig /etc/sysconfig/network-scripts/ifcfg-eth[0-9] , so maybe some installs have different names of the network devices ( ifconfig | awk '{print $1}' RS= ) depending on the types of NIC's installed..

Last edited by Scrutinizer; 03-10-2014 at 01:20 PM..
This User Gave Thanks to Scrutinizer For This Post:
# 6  
Old 03-10-2014
According to the documentation, Appendix A "Consistend Network Device Naming" eth[0123...] are replaced by em[0123...] with RedHat Linux Enterprise 6.x.
Maybe the updates are responsible for the different naming schemes: "Upgrades from Red Hat Enterprise Linux 6.0 to Red Hat Enterprise Linux 6.1 are unaffected, and the old eth[0123…] naming convention will continue to be used."
This User Gave Thanks to stdlib For This Post:
# 7  
Old 03-10-2014
It also says this:

A.1. Affected Systems
Consistent network device naming is enabled by default for a set of Dell PowerEdge, C Series, and Precision Workstation systems. For more details regarding the impact on Dell systems, visit
For all other systems, it will be disabled by default; refer to Section A.2, “System Requirements” and Section A.3, “Enabling and Disabling the Feature” for more details.
This User Gave Thanks to Scrutinizer For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. How to Post in the The UNIX and Linux Forums

Copying , renaming the file from windox box and ftp to Linux box

Hello my dear friends, Two file are auto generated from mon - fri at different directories on same windows box.Every day i have to copy the file, rename it (specific name)and ftp it to linux box specified directory. is it possible to automate this process,If yes this has to be done from windows... (1 Reply)
Discussion started by: umesh yadav
1 Replies

2. Red Hat

How to access redhat Linux box graphically from windows box?

Hi I have a linux box and need to access from windows graphically # uname -a Linux pc-l416116 2.6.18-155.el5 #1 SMP Fri Jun 19 17:06:47 EDT 2009 i686 i686 i386 GNU/Linux What components do I need to install on Linux and windows to do that? TIA (6 Replies)
Discussion started by: magnus29
6 Replies

3. UNIX for Dummies Questions & Answers

Mounting Linux box to Linux box

Hi, I've been able to mount my linux box to a windows machine, but I can't seem to mount my linux box to another linux box I have. (I know I could scp, but for other reasons I need to do it this way) Samba is installed. Here is an example where I mount to a Win machine.--> works fine mount... (12 Replies)
Discussion started by: jdilts
12 Replies

4. Shell Programming and Scripting

How to Assign SQL Query Results to Variables in Linux?

Hi, I am new to linux... How to Assign SQL Query Results to Variables in Linux,i want ti generate it in param files, Can anyone please explain me. Ex: SQL> Select * from EMP; O/P: Emp_No Emp_Name 1 AAA 2 BBB 3 CCC and I want expected... (5 Replies)
Discussion started by: Sravana Kumar
5 Replies

5. Red Hat

How to check if the Linux Box is available

Hi, I need to query and find out if anyone is logged into a Linux box or if the Linux Box is free available for login. This information is required to post the availability of the Linux Host for an instrument for another user to start using the instrument. Is there a command or script to query... (3 Replies)
Discussion started by: dks
3 Replies

6. Linux

How to find remote Linux box login account without login in to that box?

Hi, How to find remote Linux box login account without login in to that box? I don't have login account at my remote Linux box. But I need who are all having login account. How do I findout? Thanks, --Muthu. (3 Replies)
Discussion started by: Muthuselvan
3 Replies

7. Linux

Need to see CDROM on Linux box

Hi All. New to Linux and can't see cdrom after inserting into drive on linux box df -k doesn't show it. Can anyone tell em how to access the cd? Thanks (3 Replies)
Discussion started by: jamie_collins
3 Replies

8. Shell Programming and Scripting

FFMPEG in linux box

Hi all, I have successfully used ffmpeg.exe in windows. But i dont know how to use it in linux:confused:. When i tried running a java program in linux using ffmpeg, I am getting, the following error even after having that ffmpeg.exe in my classpath: " (3 Replies)
Discussion started by: ananthi_ku
3 Replies

9. Shell Programming and Scripting

Script to Reboot a linux box from a windows box

HI All, I need a script to reboot a linux box from a windows box. The script needs to run automatically whenever a sitescope alerts with an error message. Have searched for this in the forums, but could not get something relative. Pls. let me know the various alternatives we have to do... (2 Replies)
Discussion started by: Crazy_murli
2 Replies

10. UNIX for Advanced & Expert Users

Xconfigurator on Linux box.

Folks, I am loosing X configurations once I restart the linux box. Same is true with ftp and telnet services. Any clues ? I am trying RedHat 7.2, it sucks btw !! (3 Replies)
Discussion started by: amol
3 Replies
Login or Register to Ask a Question