{"id":64,"date":"2021-10-19T08:34:39","date_gmt":"2021-10-19T16:34:39","guid":{"rendered":"https:\/\/www.liljegrens.org\/?p=64"},"modified":"2021-10-19T08:35:28","modified_gmt":"2021-10-19T16:35:28","slug":"static-ip","status":"publish","type":"post","link":"https:\/\/www.liljegrens.org\/?p=64","title":{"rendered":"Static IP"},"content":{"rendered":"\n<p>&#8211;Ubuntu now uses a .yaml file and netplan to direct connections.  The name of your .yaml file may be slightly different.  Find your filename.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/etc\/netplan\nls<\/code><\/pre>\n\n\n\n<p>&#8211;use nano to change file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano your.yaml<\/code><\/pre>\n\n\n\n<p>&#8211;your file will look similar to this, keep attention to indents and indent only by spaces<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>network:\n  version: 2\n  renderer: networkd\n  ethernets:\n    ens3:\n      dhcp4: no\n      addresses:\n        - 192.168.121.221\/24\n      gateway4: 192.168.121.1\n      nameservers:\n          addresses: &#91;8.8.8.8, 1.1.1.1]<\/code><\/pre>\n\n\n\n<p>&#8211;save file and apply changes<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo netplan apply<\/code><\/pre>\n\n\n\n<p>&#8211;check<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ip addr show<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8211;Ubuntu now uses a .yaml file and netplan to direct connections. The name of your .yaml file may be slightly<\/p>\n<p><a href=\"https:\/\/www.liljegrens.org\/?p=64\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\">Static IP<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/posts\/64"}],"collection":[{"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=64"}],"version-history":[{"count":1,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/posts\/64\/revisions"}],"predecessor-version":[{"id":65,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/posts\/64\/revisions\/65"}],"wp:attachment":[{"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=64"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=64"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=64"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}