Auto-reconfigure network in Ubuntu server?

Soldato
Joined
9 May 2005
Posts
7,400
Location
Berkshire
Any one know how I can bring up the auto network configuration screen that you get during installation from the command line?

I'm sure I've done it before but I'm racking my brain now and can't work it out.

Any ideas?
 
Why would you want to? It would take it longer to do it through that than it would to set up the network from the command line!

What is it you want to do? Add an IP?

ip addr add <ip/subnet (in CIDR format)> dev <interface name>

eg ip addr add 192.168.1.2/24 dev eth0

If you want to add a route its very similar:

ip route add default via <gateway> dev <device>

put your DNS server IP in /etc/resolv.conf and away you go :)
 
Basically I don't know what the network settings at work are / should be so I want to be able to auto configure them. If I manualy set it up for my home network then it isn't going to work in the office.

I suspect my router isn't accepting the network connection from the server tbh but I'd still rather be able to autoconfigure on demand just in case.
 
Does your work place use dynamic IPs? In that case you would just use dhcpcd to get the settings when you are in work.

Unless I am misunderstanding your OP, the GUI tool merely gives you a graphical front end to the commands I typed out above.
 
You get it during the ubuntu server installation. Thing is I know you can bring it up from the terminal but I can't remember how.

Anyway it doesn't matter now, armed with the commands above I'll get to the bottom of it.
 
Back
Top Bottom