Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

assign static IP from CLI in Fedora 5

Posted on 2006-07-09
6
Medium Priority
?
6,068 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

604 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