Solved

assign static IP from CLI in Fedora 5

Posted on 2006-07-09
6
6,038 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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now