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,520 points
14,502 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
• 52,350 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 25, 2020 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 10, 2020 in Linux Administration by MD
• 95,460 points
759 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 Feb 1, 2019 in Linux Administration by Omkar
• 69,220 points
1,988 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, 2020 in Linux Administration by MD
• 95,460 points
2,391 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, 2020 in Linux Administration by MD
• 95,460 points
2,772 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 14, 2020 in Linux Administration by MD
• 95,460 points
1,284 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
1,180 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, 2020 in Docker by Pistle
• 1,000 points
2,130 views
0 votes
2 answers

Install postgreSQL on Ubuntu

Follow the below commands to install PostgreSQL (PSQL) ...READ MORE

answered Nov 12, 2020 in Database by Prachi
• 140 points
1,266 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
• 59,230 points
5,209 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP