{"id":3295,"date":"2023-11-16T17:39:44","date_gmt":"2023-11-16T08:39:44","guid":{"rendered":"https:\/\/okamoto3.com\/?p=3295"},"modified":"2024-09-25T16:29:22","modified_gmt":"2024-09-25T07:29:22","slug":"bookworm-static-ip","status":"publish","type":"post","link":"https:\/\/okamoto3.com\/index.php\/2023\/11\/16\/bookworm-static-ip\/3295\/","title":{"rendered":"dhcpcd.conf \u304c\u7121\u3044raspberry pi\u3067\u56fa\u5b9aIP(\u6709\u7dda)\u306e\u3084\u308a\u65b9"},"content":{"rendered":"<p>\u4e45\u3057\u3076\u308a\u306bRaspberry pi OS\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u56fa\u5b9aIP\u306b\u3057\u3088\u3046\u3068\u3057\u305f\u3089<\/p><p>sudo nano \/etc\/dhcpcd.conf<\/p><p>\u3042\u308c\u308c\uff1f\u7121\u3044\u3002\u307e\u3042\u3001\u4eca\u307e\u3067\u901a\u308a\u3084\u3063\u3066\u307f\u3088\u3002\u30fb\u30fb\u30fb\u30fb\u30fb\u306a\u3093\u3067\u3059\u304b\uff1f\u52d5\u304b\u3093\uff01<\/p><p>\u305d\u308c\u306fOS(<strong>bookworm<\/strong>)\u306e\u4ed5\u69d8\u5909\u66f4\u3002<\/p><h2 class=\"wp-block-heading\">\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d<\/h2><ul class=\"wp-block-list has-white-color has-black-background-color has-text-color has-background\"><li>lsb_release -a<\/li><\/ul><p>\u308f\u3057\u306e\u3084\u3064<\/p><p class=\"has-pale-cyan-blue-background-color has-background\">Distributor ID: Raspbian<br \/>Description:&nbsp;&nbsp;&nbsp; Raspbian GNU\/Linux 12 (bookworm)<br \/>Release:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12<br \/>Codename:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong> bookworm<\/strong><\/p><h2 class=\"wp-block-heading\">\u56fa\u5b9aIP\u306e\u3084\u308a\u65b9<\/h2><p>bookworm\u3067\u306f\u3001\u3068\u3044\u3046\u304blinux\u3067\u306f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30de\u30cd\u30b8\u30e3\u30fc(nmcli\u30b3\u30de\u30f3\u30c9)\u3092\u4f7f\u3046\u3002\u77e5\u3089\u3093\u304c\u306a\u3002\uff08\u4ee5\u4e0b\u3001OS\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u306e\u64cd\u4f5c\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\uff09<\/p><p>(1)\u63a5\u7d9a\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u78ba\u8a8d<\/p><ul class=\"wp-block-list has-white-color has-black-background-color has-text-color has-background\"><li>sudo nmcli connection show<\/li><\/ul><figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"113\" src=\"https:\/\/i0.wp.com\/okamoto3.com\/wp-content\/uploads\/2023\/11\/image-3.png?resize=750%2C113&#038;ssl=1\" alt=\"\" class=\"wp-image-3307\" srcset=\"https:\/\/i0.wp.com\/okamoto3.com\/wp-content\/uploads\/2023\/11\/image-3.png?w=919&amp;ssl=1 919w, https:\/\/i0.wp.com\/okamoto3.com\/wp-content\/uploads\/2023\/11\/image-3.png?resize=300%2C45&amp;ssl=1 300w, https:\/\/i0.wp.com\/okamoto3.com\/wp-content\/uploads\/2023\/11\/image-3.png?resize=768%2C116&amp;ssl=1 768w, https:\/\/i0.wp.com\/okamoto3.com\/wp-content\/uploads\/2023\/11\/image-3.png?resize=600%2C91&amp;ssl=1 600w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure><p><strong>Wired connection 1<\/strong>\u304c<strong>eth0<\/strong>\u306e\u63a5\u7d9a\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u540d<\/p><p>(2)\u56fa\u5b9aIP\u8a2d\u5b9a<\/p><ul class=\"wp-block-list has-white-color has-black-background-color has-text-color has-background\"><li>sudo nmcli connection modify &#8216;Wired connection 1&#8217; ipv4.method manual ipv4.addresses <span style=\"text-decoration:underline;\">192.168.0.73\/24<\/span> ipv4.gateway <span style=\"text-decoration:underline;\">192.168.0.1<\/span> ipv4.dns <span style=\"text-decoration:underline;\">192.168.0.1<\/span><\/li><\/ul><p>\u30a2\u30f3\u30c0\u30fc\u30e9\u30a4\u30f3\u306f\u3054\u81ea\u5206\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u304f\u3060\u3055\u3044\u3002<\/p><p><strong><mark style=\"background-color:rgba(0,0,0,0);color:#cf2e2e\" class=\"has-inline-color has-vivid-red-color\">\u5f15\u7528\u7b26\u306b\u30b7\u30f3\u30b0\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u30b3\u30d4\u30da\u3057\u305f\u6642\u3001\u30a2\u30d7\u30ea\u306b\u3088\u3063\u3066\u306f\u3001\u6587\u5b57\u5316\u3051\u3059\u308b\u4e8b\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u306e\u3067\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3088\u3046\u3067\u3057\u305f\u3089\u3001\u304a\u624b\u6570\u3067\u3059\u304c\u3001&#8217;\u3092\u624b\u6253\u3061\u3057\u3066\u4e0b\u3055\u3044<\/mark><\/strong><strong>\u3002<\/strong><\/p><p>(3)\u78ba\u8a8d<\/p><ul class=\"wp-block-list has-white-color has-black-background-color has-text-color has-background\"><li>nmcli connection show &#8216;Wired connection 1&#8217;<\/li><\/ul><p>\u30b9\u30da\u30fc\u30b9\u30ad\u30fc\u3067\u30b9\u30af\u30ed\u30fc\u30eb\u3057\u305f\u3089\u6700\u5f8c\u306e\u65b9\u306b\u51fa\u3066\u3044\u307e\u3059\u3002<\/p><p>\u308f\u3057\u306f\u3001\u6614\u306a\u304c\u3089\u304c\u597d\u304d\u3002<\/p><ul class=\"wp-block-list has-white-color has-black-background-color has-text-color has-background\"><li>sudo nano \/etc\/NetworkManager\/system-connections\/&#8217;Wired connection 1.nmconnection&#8217;<\/li><\/ul><p><strong>\/etc\/NetworkManager\/system-connections\/<\/strong>\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u3067\u304d\u3066\u3044\u308b\u3002<\/p><p>(4)\u8a2d\u5b9a\u306e\u53cd\u6620\u3068\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306e\u8d77\u52d5<\/p><ul class=\"wp-block-list has-white-color has-black-background-color has-text-color has-background\"><li>sudo nmcli connection reload<\/li>\n\n<li>sudo nmcli connection up &#8216;Wired connection 1&#8217;<\/li><\/ul><p>ssh\u3067\u3064\u306a\u3044\u3067\u305f\u3089\u5207\u308c\u3061\u3083\u3044\u307e\u3059\u3002<\/p><figure class=\"wp-block-embed is-type-wp-embed is-provider-sgg-039-s wp-block-embed-sgg-039-s\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"JVwyMVzMLz\"><a href=\"https:\/\/okamoto3.com\/index.php\/2024\/09\/25\/raspberry-pi-os-64bit-softether-vpn-bridge\/3629\/\">raspberry pi os 64bit softether VPN \u3067\u4f7f\u3046bridge\u306e\u8a2d\u5b9a<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;raspberry pi os 64bit softether VPN \u3067\u4f7f\u3046bridge\u306e\u8a2d\u5b9a&#8221; &#8212; sGG&#039;s\" src=\"https:\/\/okamoto3.com\/index.php\/2024\/09\/25\/raspberry-pi-os-64bit-softether-vpn-bridge\/3629\/embed\/#?secret=vOsAVHyhE2#?secret=JVwyMVzMLz\" data-secret=\"JVwyMVzMLz\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><figcaption class=\"wp-element-caption\">bridge\u306f\u3053\u3061\u3089<\/figcaption><\/figure><p>\u4ee5\u4e0a\u3002<\/p><hr class=\"wp-block-separator has-css-opacity\"\/><div class=\"wp-block-image is-style-rounded\"><figure class=\"aligncenter size-thumbnail\"><a href=\"https:\/\/youtube.com\/user\/hishigeki3\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/i0.wp.com\/okamoto3.com\/wp-content\/uploads\/2021\/10\/Screenshot_2021-10-25-07-00-51-667_com.google.android.youtube-01_copy_270x246.jpeg?resize=150%2C150&#038;ssl=1\" alt=\"\" class=\"wp-image-658\" srcset=\"https:\/\/i0.wp.com\/okamoto3.com\/wp-content\/uploads\/2021\/10\/Screenshot_2021-10-25-07-00-51-667_com.google.android.youtube-01_copy_270x246.jpeg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/okamoto3.com\/wp-content\/uploads\/2021\/10\/Screenshot_2021-10-25-07-00-51-667_com.google.android.youtube-01_copy_270x246.jpeg?resize=100%2C100&amp;ssl=1 100w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><figcaption class=\"wp-element-caption\">\u3088\u308d\u3057\u3051\u308c\u3070\u30c1\u30e3\u30f3\u30cd\u30eb\u767b\u9332\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u7533\u3057\u4e0a\u3052\u307e\u3059\uff01<\/figcaption><\/figure><\/div><hr class=\"wp-block-separator has-css-opacity\"\/><p><center><br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?o=9&amp;p=20&amp;l=ez&amp;f=ifr&amp;linkID=865d8e3440677383d9b2493a3354bc42&amp;t=shigeki3-22&amp;tracking_id=shigeki3-22\" width=\"120\" height=\"90\" scrolling=\"no\" border=\"0\" marginwidth=\"0\" style=\"border:none;\" frameborder=\"0\"><\/iframe><br \/>\n<\/center><\/p>","protected":false},"excerpt":{"rendered":"<p>\u4e45\u3057\u3076\u308a\u306bRaspberry pi OS\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u56fa\u5b9aIP\u306b\u3057\u3088\u3046\u3068\u3057\u305f\u3089 sudo nano \/etc\/dhcpcd.conf \u3042\u308c\u308c\uff1f\u7121\u3044\u3002\u307e\u3042\u3001\u4eca\u307e\u3067\u901a\u308a\u3084\u3063\u3066\u307f\u3088\u3002\u30fb\u30fb\u30fb\u30fb\u30fb\u306a\u3093\u3067\u3059\u304b\uff1f\u52d5\u304b\u3093\uff01 \u305d\u308c\u306fO&hellip; <a class=\"more-link\" href=\"https:\/\/okamoto3.com\/index.php\/2023\/11\/16\/bookworm-static-ip\/3295\/\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">dhcpcd.conf \u304c\u7121\u3044raspberry pi\u3067\u56fa\u5b9aIP(\u6709\u7dda)\u306e\u3084\u308a\u65b9<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":3315,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[23,135,213],"tags":[126,268],"class_list":["post-3295","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi","category-memorandum","category-all-articles","tag-raspberry-pi","tag-268","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/okamoto3.com\/wp-content\/uploads\/2023\/11\/IMG_20231108_114042.jpg?fit=119%2C119&ssl=1","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/okamoto3.com\/index.php\/wp-json\/wp\/v2\/posts\/3295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/okamoto3.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/okamoto3.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/okamoto3.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/okamoto3.com\/index.php\/wp-json\/wp\/v2\/comments?post=3295"}],"version-history":[{"count":24,"href":"https:\/\/okamoto3.com\/index.php\/wp-json\/wp\/v2\/posts\/3295\/revisions"}],"predecessor-version":[{"id":3635,"href":"https:\/\/okamoto3.com\/index.php\/wp-json\/wp\/v2\/posts\/3295\/revisions\/3635"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/okamoto3.com\/index.php\/wp-json\/wp\/v2\/media\/3315"}],"wp:attachment":[{"href":"https:\/\/okamoto3.com\/index.php\/wp-json\/wp\/v2\/media?parent=3295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/okamoto3.com\/index.php\/wp-json\/wp\/v2\/categories?post=3295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/okamoto3.com\/index.php\/wp-json\/wp\/v2\/tags?post=3295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}