{"id":3489,"date":"2018-05-27T16:41:06","date_gmt":"2018-05-27T07:41:06","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=3489"},"modified":"2023-05-27T21:23:31","modified_gmt":"2023-05-27T12:23:31","slug":"%e3%80%90linux%e3%80%91%e3%83%a6%e3%83%bc%e3%82%b6%e3%83%bc%e7%92%b0%e5%a2%83%e3%81%ae%e8%a8%ad%e5%ae%9a%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=3489","title":{"rendered":"\u3010Linux\u3011\u30e6\u30fc\u30b6\u30fc\u74b0\u5883\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3001Linux\u8d77\u52d5\u306e\u6d41\u308c"},"content":{"rendered":"<p>\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30e6\u30fc\u30b6\u30fc\u30d5\u30a9\u30eb\u30c0\u306e\u4e0b\u306b\u3001\u30e6\u30fc\u30b6\u30fc\u74b0\u5883\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>\u74b0\u5883\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7<\/h2>\n<table>\n<tbody>\n<tr>\n<th>bash\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb<\/th>\n<th>zsh\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>.bash_history<\/td>\n<td>.zsh_history<\/td>\n<td>bash\u3001zsh\u3067\u5b9f\u884c\u3057\u305f\u30b3\u30de\u30f3\u30c9\u306e\u5c65\u6b74\u3067\u3059\u3002<\/p>\n<p>history\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u4eca\u307e\u3067\u306b\u30b7\u30a7\u30eb\u3067\u5b9f\u884c\u3057\u305f\u30b3\u30de\u30f3\u30c9\u306e\u5c65\u6b74\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\uff08\u306a\u304a\u4fdd\u5b58\u3067\u304d\u308b\u5c65\u6b74\u306e\u4ef6\u6570\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u30671000\u3068\u6c7a\u307e\u3063\u3066\u3044\u307e\u3059\u3002HISTSIZE\u3068\u3044\u3046\u74b0\u5883\u5909\u6570\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u3067\u3053\u306e\u4ef6\u6570\u306f\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\u3082\u3057\u305f\u304f\u3055\u3093\u4fdd\u5b58\u3057\u305f\u3044\u5834\u5408\u306f\u3001~\/.bashrc\u306b\u8ffd\u52a0\u3057\u3066\u304a\u3044\u3066\u3082\u826f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\uff09<\/td>\n<\/tr>\n<tr>\n<td>.bash_profile<\/td>\n<td>.zshrc<\/td>\n<td>\u30ed\u30b0\u30a4\u30f3\u6642\u306b\u5b9f\u884c\u3055\u308c\u308b\u74b0\u5883\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<p>\u30ed\u30b0\u30a4\u30f3\u6642\u306e\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>.bash_logout<\/td>\n<td>.zlogout<\/td>\n<td>\u30ed\u30b0\u30a2\u30a6\u30c8\u6642\u306b\u5b9f\u884c\u3055\u308c\u308b\u74b0\u5883\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<p>\u30ed\u30b0\u30a2\u30a6\u30c8\u6642\u306e\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>.bashrc<\/td>\n<td>.zshrc<\/td>\n<td>.bash_profile\u304b\u3089\u306e\u547c\u3073\u51fa\u3057\u3084\u30b7\u30a7\u30eb(bash\u3001zsh)\u8d77\u52d5\u6642\u306b\u5b9f\u884c\u3055\u308c\u308b\u74b0\u5883\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<p>\u30b7\u30a7\u30eb\u5909\u6570\u3084\u74b0\u5883\u5909\u6570\u3001\u30a8\u30a4\u30ea\u30a2\u30b9\u306a\u3069\u30e6\u30fc\u30b6\u30fc\u74b0\u5883\u306e\u57fa\u672c\u3068\u306a\u308b\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>.bash_login<\/td>\n<td>.zlogin<\/td>\n<td>.bash_profile(.zshrc)\u304c\u306a\u3044\u5834\u5408\u306b\u3001\u4f7f\u7528\u3055\u308c\u308b\u30ed\u30b0\u30a4\u30f3\u6642\u306e\u74b0\u5883\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<p>.bash_profile\u306e\u88dc\u52a9\u306b\u4f7f\u3046\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002\u74b0\u5883\u306b\u3088\u3063\u3066\u3042\u3063\u305f\u308a\u306a\u304b\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>.profile<\/td>\n<td>.profile<\/td>\n<td>.bash_profile(.zshrc)\u3084\u3001.bash_login(.zlogin)\u304c\u306a\u3044\u5834\u5408\u306b\u4f7f\u7528\u3055\u308c\u308b\u30ed\u30b0\u30a4\u30f3\u6642\u306e\u74b0\u5883\u8a2d\u5b9a\u3067\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5b9f\u969b\u306e\u30d5\u30a1\u30a4\u30eb<\/h3>\n<p>\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e0b\u306b\u3001\u4e0b\u8a18\u306e\u30e6\u30fc\u30b6\u30fc\u3054\u3068\u306e\u74b0\u5883\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>\u901a\u5e38\u306els\u30b3\u30de\u30f3\u30c9\u3067\u306f\u30c9\u30c3\u30c8\u304c\u3064\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u898b\u3048\u307e\u305b\u3093\u304c\u3001a\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u95b2\u89a7\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3497\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u5b9f\u969b\u306e\u30d5\u30a1\u30a4\u30eb.png\" alt=\"\" width=\"647\" height=\"51\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u5b9f\u969b\u306e\u30d5\u30a1\u30a4\u30eb.png 647w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u5b9f\u969b\u306e\u30d5\u30a1\u30a4\u30eb-300x24.png 300w\" sizes=\"(max-width: 647px) 100vw, 647px\" \/><\/p>\n<h3>\u30ed\u30b0\u30a4\u30f3\u6642\u306e\u74b0\u5883\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u8fbc\u307f\u306e\u6d41\u308c<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3494\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u30ed\u30b0\u30a4\u30f3\u6642\u306e\u6d41\u308c.png\" alt=\"\" width=\"428\" height=\"429\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u30ed\u30b0\u30a4\u30f3\u6642\u306e\u6d41\u308c.png 428w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u30ed\u30b0\u30a4\u30f3\u6642\u306e\u6d41\u308c-150x150.png 150w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u30ed\u30b0\u30a4\u30f3\u6642\u306e\u6d41\u308c-300x300.png 300w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u30ed\u30b0\u30a4\u30f3\u6642\u306e\u6d41\u308c-181x181.png 181w\" sizes=\"(max-width: 428px) 100vw, 428px\" \/><\/p>\n<h3>\u30ed\u30b0\u30a2\u30a6\u30c8\u6642\u306e\u74b0\u5883\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u8fbc\u307f\u306e\u6d41\u308c<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3495\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u30ed\u30b0\u30a2\u30a6\u30c8\u6642\u306e\u6d41\u308c.png\" alt=\"\" width=\"215\" height=\"379\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u30ed\u30b0\u30a2\u30a6\u30c8\u6642\u306e\u6d41\u308c.png 215w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u30ed\u30b0\u30a2\u30a6\u30c8\u6642\u306e\u6d41\u308c-170x300.png 170w\" sizes=\"(max-width: 215px) 100vw, 215px\" \/><\/p>\n<h2>zsh<\/h2>\n<p>2019\u5e74\u304f\u3089\u3044\u306b\u767a\u8868\u3055\u308c\u305fMacOS\u306e\u6a19\u6e96\u30b7\u30a7\u30eb\u3002MacOS X Catalina\u4ee5\u964d\u3067\u3042\u308c\u3070\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3068\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u3053\u308c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u6b63\u5f0f\u540d\u79f0\u3068\u3057\u3066\u306f\u300cZ Shell\u300d\u3067\u3059\u30021990\u5e74\u304f\u3089\u3044\u304b\u3089\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>sh(\u5143\u7956\u306e\u30b7\u30a7\u30eb)\u3001bash(Linux\u306e\u6a19\u6e96\u30b7\u30a7\u30eb\u3001Mac\u306e\u5143\u6a19\u6e96\u30b7\u30a7\u30eb)\u3001csh\u3001tcsh\u306e\u6a5f\u80fd\u3092\u307b\u307c\u7db2\u7f85\u3057\u3066\u3044\u308b\u6700\u5f37\u306e\u30b7\u30a7\u30eb\u3068\u8a00\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>Linux\u306e\u8d77\u52d5\u306e\u6d41\u308c<\/h2>\n<p>Linux\u304c\u8d77\u52d5\u3059\u308b\u969b\u306f\u4e0b\u8a18\u306e\u6d41\u308c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u30ab\u30fc\u30cd\u30eb\u306e\u8d77\u52d5<\/li>\n<li>init\u306e\u8d77\u52d5<\/li>\n<\/ol>\n<h3>\u30ab\u30fc\u30cd\u30eb\u306e\u8d77\u52d5<\/h3>\n<p>OS\u306e\u96fb\u6e90\u3092\u5165\u308c\u308b\u3068\u3001\u307e\u305aLinux\u306e\u4e2d\u6838\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3042\u308b\u30ab\u30fc\u30cd\u30eb\u304c\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<h3>init\u306e\u8d77\u52d5<\/h3>\n<p>\u30ab\u30fc\u30cd\u30eb\u304c\u8d77\u52d5\u3059\u308b\u3068\u3001\u307e\u305a\u306f<strong>init<\/strong>\u3068\u3044\u3046\u30b7\u30b9\u30c6\u30e0\u74b0\u5883\u3092\u8a2d\u5b9a\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<p>init\u306f\u3001inittab(\/etc\/inittab\uff09\u3068\u3044\u3046\u3092\u53c2\u7167\u3057\u306a\u304c\u3089\u6b21\u306e\u3088\u3046\u306a\u3053\u3068\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<h4>\u30e9\u30f3\u30ec\u30d9\u30eb\u306e\u8a2d\u5b9a<\/h4>\n<p>\u30e9\u30f3\u30ec\u30d9\u30eb\u3068\u306f\u3001Linux\u304c\u3069\u306e\u3088\u3046\u306a\u72b6\u614b\u3067\u52d5\u4f5c\u3057\u3066\u3044\u308b\u306e\u304b\u3092\u6c7a\u5b9a\u3059\u308b\u6570\u5b57\u3067\u3059\u3002<\/p>\n<table>\n<tbody>\n<tr>\n<th>\u30e9\u30f3\u30ec\u30d9\u30eb<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>\u30b7\u30b9\u30c6\u30e0\u306e\u7d42\u4e86(\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3)<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>\u30b7\u30f3\u30b0\u30eb\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9(root\u3060\u3051\u304c\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u30e2\u30fc\u30c9)<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306a\u3057\u306e\u30de\u30eb\u30c1\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9\uff08\u5236\u9650\u4ed8\uff09<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9(CUI)\u306b\u3088\u308b\u30de\u30eb\u30c1\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9(\u5236\u9650\u306a\u3057\uff09<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>\u672a\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>\u30b0\u30e9\u30d5\u30a3\u30ab\u30eb\u30e2\u30fc\u30c9(GUI)\u306b\u3088\u308b\u30de\u30eb\u30c1\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>\u30b7\u30b9\u30c6\u30e0\u306e\u518d\u8d77\u52d5\uff08\u30ea\u30d6\u30fc\u30c8\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>\u30de\u30eb\u30c1\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9<\/h5>\n<p>\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u3067\u4f7f\u7528\u3059\u308b\u30e2\u30fc\u30c9\u3067\u3059\u3002\u901a\u5e38\u306e\u904b\u7528\u6642\u306f\u3053\u3061\u3089\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<h5>\u30b7\u30f3\u30b0\u30eb\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9<\/h5>\n<p>\u7ba1\u7406\u8005\u4e00\u4eba\u3060\u3051\u304c\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u30e2\u30fc\u30c9\u3067\u3059\u3002\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u6642\u306b\u3001\u7ba1\u7406\u8005\u304c\u4f5c\u696d\u3059\u308b\u5834\u5408\u7b49\u306b\u4f7f\u3044\u307e\u3059\u3002<span style=\"color: #ff0000;\"><strong>\u7ba1\u7406\u8005\u306e\u4ed6\u306b\u8ab0\u3082\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u5b89\u5fc3\u3057\u3066\u4f5c\u696d\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/strong><\/span><\/p>\n<h4>\u521d\u671f\u5316\u30b9\u30af\u30ea\u30d7\u30c8(rc.sysinit\u30d5\u30a1\u30a4\u30eb)\u306e\u5b9f\u884c<\/h4>\n<p>rc.sysinit\u3068\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u3092\u521d\u671f\u5316\u3059\u308b\u305f\u3081\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002<\/p>\n<p>\u5225\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u3084\u3001\u74b0\u5883\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb(\/etc\/rc.d\/rc.sysinit\u7b49)\u3092\u547c\u3073\u51fa\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<h5>rc.sysinit\u304c\u884c\u3046\u3053\u3068<\/h5>\n<ul>\n<li>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a<\/li>\n<li>\u30db\u30b9\u30c8\u540d\u8a2d\u5b9a<\/li>\n<li>\u30ab\u30fc\u30cd\u30eb\u8a2d\u5b9a<\/li>\n<li>\u30af\u30ed\u30c3\u30af\u8a2d\u5b9a<\/li>\n<li>\u30b7\u30b9\u30c6\u30e0\u30d5\u30a9\u30f3\u30c8\u306e\u8a2d\u5b9a<\/li>\n<li>\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u8a2d\u5b9a<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30e6\u30fc\u30b6\u30fc\u30d5\u30a9\u30eb\u30c0\u306e\u4e0b\u306b\u3001\u30e6\u30fc\u30b6\u30fc\u74b0\u5883\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002 \u74b0\u5883\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7 bash\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb zsh\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb \u8aac\u660e .bash_history .zsh_history bash [&hellip;]","protected":false},"author":1,"featured_media":3494,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[39],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/3489"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3489"}],"version-history":[{"count":9,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/3489\/revisions"}],"predecessor-version":[{"id":20348,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/3489\/revisions\/20348"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/media\/3494"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3489"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}