{"id":9161,"date":"2023-02-08T05:23:39","date_gmt":"2023-02-07T20:23:39","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=9161"},"modified":"2023-07-18T21:03:20","modified_gmt":"2023-07-18T12:03:20","slug":"linux%e3%81%a7%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%83%97%e3%83%ad%e3%83%b3%e3%83%97%e3%83%88%e3%82%92%e5%a4%89%e6%9b%b4%e3%81%99%e3%82%8b%ef%bc%81%ef%bc%88bash%ef%bc%8fps1%ef%bc%89","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/9161","title":{"rendered":"Linux\u3067\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u5909\u66f4\u3059\u308b\uff01\uff08bash\uff0fPS1\uff09"},"content":{"rendered":"<p>Linux\u3067bash\u306e\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u8868\u793a\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u8868\u793a\u8a2d\u5b9a\u306f\u3001\u30b7\u30a7\u30eb\u5909\u6570\u300cPS1\u300d\u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n&#x5B;usradmin@server01 ~]$ set | grep PS1\r\nPS1='&#x5B;\\u@\\h \\W]\\$ '\r\n<\/pre>\n<h2>\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u8868\u793a\u3092\u30b7\u30f3\u30d7\u30eb\u306b\u3059\u308b\uff01<\/h2>\n<p>\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u8868\u793a\u3092\u8a18\u53f7\u300c$\u300d\u4e00\u3064\u306e\u65b0\u5a66\u306a\u8868\u793a\u306b\u5909\u66f4\u3057\u307e\u3059\u3002\u30b7\u30a7\u30eb\u5909\u6570\u306e\u5024\u3092\u5909\u66f4\u3059\u308b\u3068\u3001\u5373\u5ea7\u306b\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u8868\u793a\u304c\u5909\u66f4\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n&#x5B;usradmin@server01 ~] PS1='\\$ '\r\n$\r\n<\/pre>\n<h2>\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u30d1\u30b9\u8868\u793a\u3092\u30d5\u30eb\u30d1\u30b9\u306b\u3059\u308b\uff01<\/h2>\n<p>\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u30d1\u30b9\u3092\u30d5\u30eb\u30d1\u30b9\u8868\u793a\u306b\u3057\u307e\u3059\u3002\u300c\\W\u300d\u306e\u90e8\u5206\u3092\u300c\\w\u300d\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n&#x5B;usradmin@server01 ~]$ PS1='&#x5B;\\u@\\h \\w]\\$ '\r\n&#x5B;usradmin@server01 ~]$ cd \/etc\/systemd\r\n&#x5B;usradmin@server01 \/etc\/systemd]$ \r\n<\/pre>\n<h2>\u30ed\u30b0\u30a4\u30f3\u6642\u304b\u3089\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u8868\u793a\u3092\u5909\u66f4\u3059\u308b\uff01<\/h2>\n<p>\u30ed\u30b0\u30a4\u30f3\u6642\u304b\u3089\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u8868\u793a\u3092\u5909\u66f4\u3059\u308b\u5834\u5408\u306f\u3001\u300c.bash_profile\u300d\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,10]; title: ; notranslate\" title=\"\">\r\n&#x5B;usradmin@server01 ~]$ cat .bash_profile \r\n# .bash_profile\r\n\r\n# Get the aliases and functions\r\nif &#x5B; -f ~\/.bashrc ]; then\r\n\t. ~\/.bashrc\r\nfi\r\n\r\n# User specific environment and startup programs\r\nPS1='&#x5B;\\u@\\h \\w]\\$ '\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>\u4f5c\u696d\u306e\u7528\u9014\u306b\u5fdc\u3058\u3066\u3001\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u5909\u66f4\u3059\u308b\u3068\u4f5c\u696d\u304c\u306f\u304b\u3069\u308b\u3053\u3068\u9593\u9055\u3044\u306a\u3044\u306e\u3067\u3001\u7a4d\u6975\u7684\u306b\u5229\u7528\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/8974\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u30b3\u30de\u30f3\u30c9\u64cd\u4f5c\u3092\u884c\u3046\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2021\/02\/fi_linux_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u30b3\u30de\u30f3\u30c9\u64cd\u4f5c\u3092\u884c\u3046\uff01<\/div><div class=\"substr\">Linux\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3001\u30b3\u30de\u30f3\u30c9\u64cd\u4f5c\u3092\u884c\u3046\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\uff01...<\/div><\/a><\/div>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/7679\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2021\/02\/fi_linux_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01<\/div><div class=\"substr\">Linux\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<h2>\u95a2\u9023\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<p><a href=\"https:\/\/amzn.to\/3H5qkUu\" rel=\"noopener\" target=\"_blank\"><img decoding=\"async\" class=\"paapi5-pa-product-image-source lazyload\" data-src=\"https:\/\/m.media-amazon.com\/images\/I\/51ZPkoBGdZL._SL160_.jpg\" alt=\"N\/A\"><\/a><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u3067bash\u306e\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":5527,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[197],"tags":[374,282,762,25,583],"class_list":["post-9161","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-login-session","tag-bash","tag-linux","tag-ps1","tag-25","tag-583"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/9161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=9161"}],"version-history":[{"count":1,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/9161\/revisions"}],"predecessor-version":[{"id":13100,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/9161\/revisions\/13100"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/5527"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=9161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=9161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=9161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}