?
Solved

assign static IP from CLI in Fedora 5

Posted on 2006-07-09
6
Medium Priority
?
6,066 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Stressed Out?

Watch some penguins on the livecam!

 
LVL 26

Accepted Solution

by:
jar3817 earned 2000 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

PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

765 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