How to a Setup Static IP Address in Linux using Netplan - Beginners Guide

preview_player
Показать описание
How to Setup a Static IP Address, Networking Terms, and using a Terminal with NetPlan to set your Static IP Address in Linux. We'll discuss How to Setup a Static IP Address in Linux (ubuntu) using Netplan. As well as, mention some of the terms you need to know around networking to successfully reserve a Static IP Address on your local network. This can be used with any other Linux Distro that uses Netplan and doesn't have to be only used on Ubuntu 20.04 LTS.

By default Ubuntu and most Linux distributions will assign an IP Address dynamically using a DHCP Server.

To set a static ip address through terminal we’re going to use Netplan which is a utility that allows us to configure networking settings on linux. Netplan uses the YAML convention by allowing us to configure a network with a simple YAML file. All that YAML stands for is Yet Another Markup Language. It’s a serialization language that is most often used for configuration files.

My Linux Cheat Sheet and 25 Page Checklist here:

Share this free tool and support Small YouTubers
(I made this tool to help creators)

Want more info/content?

Useful Links/Commands
Setup in the Video for Reference:
network:
version: 2
renderer: networkd *the renderer property tells netplan which network manager will manage devices connected to the linux box
ethernets:
enp0s3:
dhcp4: no
addresses: [192.168.1.4/24]
gateway4: 192.168.1.1
this tells us how to communicate to devices on different subnets
nameservers:
addresses: [8.8.8.8,8.8.4.4]

#linux #ubuntu #pc
Рекомендации по теме
Комментарии
Автор

Thanks. A nice and straight-forward video. Much appreciated!

mcw
Автор

The best tutorial ever on static ip addresses! And the clearest approach! Thanks

fehyuqi
Автор

Thank you for this video. It was very clear, straightforward and to the point. I will save it in my Playlist.

NigerianBaller
Автор

this is by far the most simple way to do that. Thanks !!

ZapRodil
Автор

Great teacher! Great tutorial Everything is clear and easy to understand!
Thank you!!!

mielushelheureux
Автор

This was really helpful, thanks so much😁

Babibll
Автор

thank you! the tutorial it not too long, explains everything perfectly and quickly.

SleepySpeller
Автор

Thanks for this video. You very help me.

kubapierwszy
Автор

This was a great video. I wasn't sure what my issue was but this solved it. I installed an Ubuntu virtual machine on a Windows server 2019 with Hyper V. My host server has multiple dedicated IP addresses, and I am behind a Fortigate network Firewall. Once I got my Firewall policies in place, I went thru the GUI to add a static IP address to Ubuntu. Everything I entered seemed correct but I couldn't get the internet to work even though in Ubuntu it said "wired connected" - but my browser wasn't connecting to the internet., Anyways, I followed your video and now my internet works. I wonder why the GUI wasn't giving me same results. Whoever is in charge of Ubuntu's GUI should make sure it works as good as coding because the point of wanting to use Ubuntu desktop is not having to code. In any case, your video was great, easy to follow and you have a clear voice. Perfect.

VideosNYC
Автор

Please do the same video for wireless secured networks?

shanthankasula
Автор

Sounds easy, BUT in my case I have a raspberry pi 3b+ with eth0, where I have NO inet only a inet6 with a hexa-address and NO netmask and NO broadcast. How to configure that ? Means how to set up a proper subnet ?

tricia
Автор

Hay savvy Nice video... you are the best

LordOfWizardurl
Автор

after I do this my ip address shown in ipconfig does not change, even after a restart. I am using my wifi driver, and I get no error message after following your steps. But I still have the given IP address. I am very confused about why this is and I have been trying for days to get this to work.

GeneralHowToTutorials
Автор

After changing static IP and put this command " sudo netplan try", the internet disconnected ! Then I re login into and there is no changing in static IP !

xracc
Автор

I have tried this but while applying using sudo netplan try, it says that gateway address deprecated. What can i Do?

parthasarathysingh
Автор

That was a perfect expression. Thank you sir.

ahmtysn
Автор

it doesnt work on rpi4 running ubuntu server. i get a bunch of errors when i try.

cybrphrk
Автор

How would you add routes to the yaml file? Not sure of spacing

willkillz
Автор

Bruh How can i access the localhost through iP address in same network in linux, share anything related to this!!!! I messed up with this to finding answer

soulsscience
Автор

I know when you created this it was bang on but gateway4: has been deprecated and now you have to do routes: (inline with addresses:) ( new line and space 20 spaces to the - in to) -to: 0.0.0.0/0 (new line and lined up with the t in to) via: 10.1.1.1 (new line and lined up with the v in via ) metric:100. Or just do "man netplan" and scroll down to the routes example. If you do the "sudo netplan try" it will tell you of the deprecation and you can accept the changes. I think gateway4: still works but will go away eventually. Just FYI. Great video btw!

damaliamarsi