{"id":1246,"date":"2015-10-29T09:04:16","date_gmt":"2015-10-29T09:04:16","guid":{"rendered":"https:\/\/www.davidpapkin.net\/?p=1246"},"modified":"2015-10-29T09:04:16","modified_gmt":"2015-10-29T09:04:16","slug":"setting-ip-address-on-ubuntu-linux-by-david-papkin","status":"publish","type":"post","link":"https:\/\/davidpapkin.com\/?p=1246","title":{"rendered":"Setting IP address on Ubuntu Linux  by David Papkin"},"content":{"rendered":"<p>This post by David Papkin will focus on setting IP addresses with Ubuntu Linux without the GUI<\/p>\n<p>There are several ways to set an IP address in Linux.<\/p>\n<p id=\"gather-info\"><strong><span style=\"text-decoration: underline;\">Which connection do I use for my static IP?<\/span><\/strong><\/p>\n<p>So, lets have a look at our current network information, open a terminal and type\/copy the following command:<\/p>\n<pre class=\"prettyprint lang-bsh\"><span class=\"pln\">ifconfig <\/span><span class=\"pun\">-<\/span><span class=\"pln\">a<\/span><\/pre>\n<p>This will show which interfaces are available. We will use <strong>eth3<\/strong> for this post.<\/p>\n<p><a href=\"https:\/\/www.davidpapkin.net\/wp-content\/uploads\/2015\/10\/ifconfig.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1247 size-medium\" src=\"https:\/\/www.davidpapkin.net\/wp-content\/uploads\/2015\/10\/ifconfig-300x126.jpg\" alt=\"ifconfig ip address\" width=\"300\" height=\"126\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>We will set eth3 IP address on 192.168.1.0\/24 space<\/p>\n<p>1) We can manually set the values using an editor such as vi or nano.<\/p>\n<p><strong>sudo vi\u00a0\/etc\/network\/interfaces<\/strong><\/p>\n<div id=\"attachment_1249\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/www.davidpapkin.net\/wp-content\/uploads\/2015\/10\/VI_ifconfigCMD.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1249\" class=\"size-medium wp-image-1249\" src=\"https:\/\/www.davidpapkin.net\/wp-content\/uploads\/2015\/10\/VI_ifconfigCMD-300x17.jpg\" alt=\"VI command by David Papkin\" width=\"300\" height=\"17\" \/><\/a><p id=\"caption-attachment-1249\" class=\"wp-caption-text\">a) VI command<\/p><\/div>\n<p><a href=\"https:\/\/www.davidpapkin.net\/wp-content\/uploads\/2015\/10\/setIPwithVI.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1248 size-medium\" src=\"https:\/\/www.davidpapkin.net\/wp-content\/uploads\/2015\/10\/setIPwithVI-300x191.jpg\" alt=\"setIPwithVI IP adress\" width=\"300\" height=\"191\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Some people may find vi difficult to use, so nano is an easier alternative, if your system has this utility installed.<\/p>\n<p>b) nano<\/p>\n<p><strong>sudo nano \/etc\/network\/interfaces<\/strong><\/p>\n<p><a href=\"https:\/\/www.davidpapkin.net\/wp-content\/uploads\/2015\/10\/setIPwithNANO.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1250 size-medium\" src=\"https:\/\/www.davidpapkin.net\/wp-content\/uploads\/2015\/10\/setIPwithNANO-300x174.jpg\" alt=\"setIPwithNANO by David Papkin ip address\" width=\"300\" height=\"174\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>After you edit \/etc\/network\/interfaces file, you must restart the networkign service<\/p>\n<p><strong><em>sudo \/etc\/init.d\/networking restart<\/em><\/strong><\/p>\n<p>2) you can use the ifconfig command to set the IP values<\/p>\n<p><a href=\"https:\/\/www.davidpapkin.net\/wp-content\/uploads\/2015\/10\/setIPwithIFCONFIG.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1251 size-medium\" src=\"https:\/\/www.davidpapkin.net\/wp-content\/uploads\/2015\/10\/setIPwithIFCONFIG-300x158.jpg\" alt=\"setIPwithIFCONFIG by David Papkin ip address\" width=\"300\" height=\"158\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.tecmint.com\/ifconfig-command-examples\/\">http:\/\/www.tecmint.com\/ifconfig-command-examples\/<\/a><\/p>\n<p><a href=\"https:\/\/help.ubuntu.com\/community\/NetworkConfigurationCommandLine\/Automatic\">https:\/\/help.ubuntu.com\/community\/NetworkConfigurationCommandLine\/Automatic<\/a><\/p>\n<p>This concludes this post by David Papkin will focus on setting IP addresses with Ubuntu Linux without the GUI<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post by David Papkin will focus on setting IP addresses with Ubuntu Linux without the GUI There are several ways to set an IP address in Linux. Which connection do I use for my static IP? So, lets have&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[67,99,163],"class_list":["post-1246","post","type-post","status-publish","format-standard","hentry","category-david-papkin","category-linux","tag-david-papkin","tag-linux","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/davidpapkin.com\/index.php?rest_route=\/wp\/v2\/posts\/1246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davidpapkin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davidpapkin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davidpapkin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davidpapkin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1246"}],"version-history":[{"count":0,"href":"https:\/\/davidpapkin.com\/index.php?rest_route=\/wp\/v2\/posts\/1246\/revisions"}],"wp:attachment":[{"href":"https:\/\/davidpapkin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davidpapkin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davidpapkin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}