How to change IP address of an Ubuntu VM?

0 votes
I am trying to set up a Kubernetes cluster and I need a master and a slave node. The thing is, I am using Virtual machines and both these VM's are on the same system. And the master and worker node cannot have the same IP address.

How do I change the IP of my VM?
Nov 20, 2019 in Linux Administration by Hannah
• 18,410 points
621 views

2 answers to this question.

0 votes

Go to your Linux terminal and execute the following command to check for your current IP address

ifconfig

image

Execute the following command to change the IP

ifconfig eth0 <new-ip>

image

answered Nov 20, 2019 by Kalgi
• 51,950 points
0 votes

The easiest method is through network manager:

1- From the top of the screen select the network icon, next to the clock and volume, then click Edit Connections.

2- From the window that opens, go to Wired tab, select your connection (there should be only one connection, if you didn't touch anything). Then click Edit.

3- From the IPv4 Settings tab change Method from Automatic (DHCP) to Manual.

4- Under Addresses feild, click on Add.

5- Enter your desired IP address and subnet mask and click Save, you can also enter an optional DNS server here.

Hope this will help

answered Aug 24 by Pistle
• 300 points

Related Questions In Linux Administration

0 votes
1 answer

How to block an IP address to connect my webserver?

Hi@akhtar, You can block one IP address using ...READ MORE

answered Jun 9 in Linux Administration by MD
• 56,480 points
83 views
0 votes
1 answer

How to change permissions of folder and files in folder?

The chmod command is used to set/change the permissions ...READ MORE

answered Jan 31, 2019 in Linux Administration by Omkar
• 69,030 points
119 views
0 votes
1 answer

How to change port no 80 of httpd webserver?

Hi@akhtar, You can change port no of httpd ...READ MORE

answered Apr 21 in Linux Administration by MD
• 56,480 points
55 views
0 votes
1 answer

Not able to find IP address in VM.

Hi@akhtar, You need to change your network adapter ...READ MORE

answered Jul 8 in Linux Administration by MD
• 56,480 points
46 views
0 votes
1 answer

How to change the owner of any folder in Linux system?

Hi@akhtar, Linux system has one command named chown. This ...READ MORE

answered Aug 13 in Linux Administration by MD
• 56,480 points
63 views
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
183 views
0 votes
2 answers

How does networking on Docker for Windows work?

Each container has a virtual network adapter (vNIC) which is connected ...READ MORE

answered Aug 29 in Docker by Pistle
• 1,000 points
503 views
0 votes
1 answer

Install postgreSQL on Ubuntu

Installing PostgreSQL on Ubuntu is very simple, ...READ MORE

answered Mar 22, 2019 in Database by Nitesh
154 views
+1 vote
2 answers

if the File system is full how to troubleshoot ?

Check filesystem usage. df -h If /var is showing ...READ MORE

answered Nov 18, 2019 in Linux Administration by Sirajul
• 57,940 points
330 views