Page 1 of 1

Command to reconnect to Ethernet?

Posted: Wed 23 Mar 2016, 03:45
by Subito Piano
Hi all...i am writing a script and need to know the command to restart the (wired) network. I've searched, and though i'm in TahrPup, the usual Debian commands don't seem to work. I found networkdisconnect in a subfolder of /etc, so i can use that to disconnect, but found no "networkreconnect" (or whatever it would be called) to reconnect.

Thanks in advance.

Posted: Sun 19 Jan 2020, 10:11
by jplt3
Hello , this post is quiet old ! but it can help someone :

To activated your connection via ethernet(eth0,...) or wifi(wlan0,...)

Code: Select all

List of all interfaces : ifconfig -a 

Code: Select all

Activate the ethernet connection : ifconfig eth0 up 

Code: Select all

Desactivate the ethernet connection : ifconfig eth0 down 
All same for wifi change eth0 by the interface wlan0,wlan1,....

Posted: Sun 19 Jan 2020, 19:02
by Subito Piano
Thanks, jplt3! I will make a note of that for the future, plus as you mentioned, now the answer is here for anyone else who may need it. :D