Solved

assign static IP from CLI in Fedora 5

Posted on 2006-07-09
6
6,055 Views
Last Modified: 2008-01-09
Hi,
I would like to assign static IP address to eth0 from command line interface in Fedora 5. I did look around. I found that:
ifconfig eth0 192.168.2.33 netmask 255.255.255.0 up
Should do it. However, whenver i typed it returns:
Returned:
-bash: ifconfig: command not found

Than i tryed:
./ ifconfig eth0 192.168.2.33 netmask 255.255.255.0 up
Returned:
-bash: ifconfig: command not found

I tryed other commands(i.e. ifstatus) with the same outcome. How do i assign static IP to eth0 from CLI in Fedora 5?
Thank YOu,
M
0
Comment
Question by:margotsk
6 Comments
 
LVL 19

Expert Comment

by:alextoft
ID: 17071078
It sounds like your environment variable PATH is not including the location of ifconfig. Not a Fedora user myself, but it should be in /sbin

Try /sbin/ifconfig eth0 192.168..... etc
0
 
LVL 19

Expert Comment

by:alextoft
ID: 17071082
Also, Fedora (at least it used to) has locate installed by default, so try locate ifconfig

It'll be there, somewhere..
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17071943
You propably trying run this command as regular user. Try as root
0
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
LVL 26

Accepted Solution

by:
jar3817 earned 500 total points
ID: 17071966
You can also edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file. You should make it look something like this:

DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.2.255
IPADDR=192.168.2.33
NETMASK=255.255.255.0
NETWORK=192.168.2.0
ONBOOT=yes

Then just bring the interface down and up again: /sbin/ifdown eth0 && /sbin/ifup eth0
0
 
LVL 24

Expert Comment

by:slyong
ID: 17078362
I prefer to use the system-config tool... there is a system-config-network-tui for CLI.
as ravenpl said.. run as root:

$ su -
enter your root password
# system-config-network-tui
0
 

Author Comment

by:margotsk
ID: 17079102
Thanks for response,
I followed jar3817 suggestion and it worked. I am sure other sollution may work, but jar3817 suggestion seemed more fit in our case. Thank You for your responses
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question