Q. How do I change IP address under Ubuntu Linux using GUI and command line options?
A. You can change IP address using GUI tool called network-admin or by editing /etc/network/interfaces configuration file.
Ubuntu Linux Change IP Using Network Administration GUI Tool
The Network Administration Tool allows you to specify the way your system connects to other computers and to internet.
How do I start Network Administration Tool to change TCP/IP settings?
You can start Network Administration Tool by clicking on System menu > Choose Administration > Network tool.
Alternatively, open terminal (command line) and execute the following command:
$ network-admin &
When you start Network Administration Tool, you will be prompted for the administrator password, this is necessary because the changes done with this tool will affect the whole system. If not prompted for password click on Unlock button:
The Network Administration Tool main window contains four tabbed sections:
- Connections : Shows all network interfaces, it also allows you to modify their settings.
- General : Allows you to modify your system host name and domain name.
- DNS : Contains two sections, the DNS servers are what your computer use for resolving the IP addresses from the domain names. The search domains are the default domains in which your system will search any host when no domain is specified.
- Hosts : Shows the list of aliases for accessing other computers.
Ubuntu Linux Change IP Using Command Line Config File
Open terminal and type the following command:
sudo vi /etc/network/interfaces
sudo gedit /etc/network/interfaces
Find eth0 section and setup IP address as follows:
auto eth0 iface eth0 inet static address 192.168.2.1 netmask 255.255.255.0 network 192.168.2.0 broadcast 192.168.2.255
Save and close the file. Once done, restart network:
$ sudo /etc/init.d/networking restart
Verify new IP address:
$ ifconfig eth0
For further information see this tutorial.
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop