Avatar of samjud
samjud
 asked on

Restart Ethernet Interface

I have a Linux box, I used WinSCP to change the configuration (there was no default-gateway and I added one) on one of the Ethernet ports (eth0). Is there a command I can run to restart the interface to have the changes take effect without restarting the machine?
LinuxLinux Networking

Avatar of undefined
Last Comment
Autogard

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Autogard

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
samjud

ASKER
That actually worked perfect.
I just have a question, If there was no default gateway on one of the ethernet ports and I added one, and then ran the above commands, Will it have taken effect? I assume yes.
Autogard

I'm actually not sure. I seem to remember running this command to take an ip address change into effect and from what I remember it may not have taken the change.

What distribution are you using? Is there a way to go into the network card settings after making the change and then running that command and checking what the gateway is (to see if it really changed or not)?
samjud

ASKER
I'm  not sure to either questions, any suggestions would be very helpful.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
samjud

ASKER
the ifconfig command by itself gives status of the network interfaces and I don't see any default gateways configured at all
Autogard

Do you know what version of Linux you are running?
samjud

ASKER
Sorry to sound dumb, but how can I tell?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Autogard

The first way is just to notice any splash screens that show up when you are booting into your system. Most distributions will have some kind of screen or logo that lets you know what distro it is.

Another thing to try is to run "cat /proc/version". Somewhere in the string that is returned, you should find what type of Linux you are running.

Depending on what distribution you are running, there should be some graphical configuration utility (on SuSE it is called YaST). Look in your "startup" menu to see if you can find anywhere to configure a network card.

You also mentioned WinSCP to configure your network card. Will that program let you know what the current settings are as well?