LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to edit/change IP information in the terminal? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-edit-change-ip-information-in-the-terminal-541975/)

kitek 03-30-2007 02:11 PM

How to edit/change IP information in the terminal?
 
I don't know linux command prompt very well. I need to be able to change/edit the ethernet card information in the terminals ome how. If I just knew the commnad....

rtspitz 03-30-2007 02:21 PM

for non-permanent changes you can use 'ifconfig'.
routes may be affected.

reddazz 03-30-2007 02:23 PM

The ifconfig command can help you. It has quite a lot of options, so to find out how to use it, read the manual by entering "man ifconfig" in the command line (or on google).

kitek 03-30-2007 02:34 PM

Quote:

Originally Posted by rtspitz
for non-permanent changes you can use 'ifconfig'.
routes may be affected.

I sure want to learn the terminal it reminds me of the DOS days. I want to change the eth0 permanetly.

Linville79 03-30-2007 02:43 PM

# vi /etc/sysconfig/network-scripts/ifgfc-eth0

The above, assumes that you have knowledge of using Vi to edit text files.

reddazz 03-31-2007 02:11 AM

Quote:

Originally Posted by kitek
I sure want to learn the terminal it reminds me of the DOS days. I want to change the eth0 permanetly.

Most distros have apps which can help you change network settings using a terminal or GUI app. If your distro dos not provide a text or GUI based app to change network settings, you can edit the networking scripts by yourself. The exact name and location of the scripts vries between distros and since you have not mentioned which distro you are using we can't give you accurate details.

Hitboxx 03-31-2007 02:21 AM

Quote:

Originally Posted by Linville79
# vi /etc/sysconfig/network-scripts/ifgfc-eth0

The above, assumes that you have knowledge of using Vi to edit text files.

It is
# vi /etc/sysconfig/network-scripts/ifcfg-eth0

jschiwal 03-31-2007 02:37 AM

Quote:

Originally Posted by shrikant.odugoudar
It is
# vi /etc/sysconfig/network-scripts/ifcfg-eth0

If your distro is SuSE linux, the ifcfg-<dev> scripts are located in /etc/sysconfig/network/. Other distro's have a script with ifconfig or ip commands which set many options directly. Like Reddazz said, you should post which distro you are using, or better yet, put it in your profile.

Linville79 04-02-2007 07:24 AM

Quote:

Originally Posted by shrikant.odugoudar
It is
# vi /etc/sysconfig/network-scripts/ifcfg-eth0

Oops... typo, my bad.


All times are GMT -5. The time now is 04:04 AM.