{"id":1069,"date":"2017-11-17T12:32:14","date_gmt":"2017-11-17T03:32:14","guid":{"rendered":"https:\/\/akamist.com\/blog\/?p=1069"},"modified":"2017-11-22T14:34:23","modified_gmt":"2017-11-22T05:34:23","slug":"linux%e3%82%b7%e3%82%a7%e3%83%ab%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88%e3%81%a7%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e3%82%92%e8%87%aa%e5%8b%95%e7%94%9f%e6%88%90%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/akamist.com\/blog\/archives\/1069","title":{"rendered":"[Linux]\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b"},"content":{"rendered":"<p>Linux\u306e\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u51e6\u7406\u3092\u81ea\u52d5\u5316\u3059\u308b\u6642\u3001\u521d\u671f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30e9\u30f3\u30c0\u30e0\u306a\u5024\u3067\u30bb\u30c3\u30c8\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u3001Linux\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b\/dev\/urandom\u3092\u5229\u7528\u3059\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<h2>\/dev\/urandom\u3092\u5229\u7528\u3057\u305f\u30b3\u30de\u30f3\u30c9\u306e\u4f8b<\/h2>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u306fbash\u74b0\u5883\u3067\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u5909\u6570PASSWORD\u306b\u30e9\u30f3\u30c0\u30e0\u306a10\u6587\u5b57\u306e\u6587\u5b57\u5217\u304c\u5165\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-bash\">$ PASSWORD=$(more \/dev\/urandom  | tr -d -c '[:alnum:]' | fold -w 10 | head -1)\n$ echo ${PASSWORD}\nyf3CWBM73i\n<\/code><\/pre>\n<p>\u518d\u5ea6\u540c\u3058\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u7570\u306a\u308b\u5024\u304c\u53d6\u5f97\u3067\u304d\u308b\u306e\u3067\u3001\u305f\u3057\u304b\u306b\u30e9\u30f3\u30c0\u30e0\u306a\u6587\u5b57\u5217\u3067\u3042\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-bash\">$ PASSWORD=$(more \/dev\/urandom  | tr -d -c '[:alnum:]' | fold -w 10 | head -1)\n$ echo ${PASSWORD}\n5EnpB2UcFY\n<\/code><\/pre>\n<h2>\u30e9\u30f3\u30c0\u30e0\u30d1\u30b9\u30ef\u30fc\u30c9\u751f\u6210\u306e\u4ed5\u7d44\u307f<\/h2>\n<p>\u4e0a\u8a18\u306e\u4f8b\u3067\u306f\u8907\u6570\u306e\u30b3\u30de\u30f3\u30c9\u3092\u30d1\u30a4\u30d7\u3067\u7e4b\u3044\u3067\u304a\u308a\u5c11\u3057\u8907\u96d1\u306a\u306e\u3067\u3001\u52d5\u4f5c\u306e\u539f\u7406\u30921\u3064\u3065\u3064\u9806\u3092\u8ffd\u3063\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001<code>more \/dev\/urandom<\/code>\u3067\u30e9\u30f3\u30c0\u30e0\u306a\u5024\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\/dev\/urandom\u306f\u30e9\u30f3\u30c0\u30e0\u306a\u6587\u5b57\u5217\u3092\u30d0\u30a4\u30ca\u30ea\u3067\u8fd4\u3059\u306e\u3067\u3001<code>tr -d -c '[:alnum:]'<\/code>\u30b3\u30de\u30f3\u30c9\u3092\u901a\u3057\u3001\u5236\u5fa1\u6587\u5b57\u3092\u6368\u3066\u3066\u82f1\u6570\u6587\u5b57\u3060\u3051\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001<code>fold -w 10<\/code>\u306710\u6587\u5b57\u6bce\u306b\u6539\u884c\u3092\u884c\u3044\u3001\u6700\u5f8c\u306b<code>head -1<\/code>\u3067\u6700\u521d\u306e1\u884c\u306e\u307f\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u30b3\u30de\u30f3\u30c9\u5168\u4f53\u3092$()\u3067\u56f2\u3044\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u7d50\u679c\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u53d6\u5f97\u3057\u307e\u3059\u3002\u53d6\u5f97\u3057\u305f\u5024\u306fPASSWORD\u5909\u6570\u306b\u4ee3\u5165\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u6539\u9020\u3059\u308b<\/h2>\n<p>\u4e0a\u8a18\u306e\u4ed5\u7d44\u307f\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u751f\u6210\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u30d1\u30a4\u30d7\u3067\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u5f8c\u7d9a\u30b3\u30de\u30f3\u30c9\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u3067\u632f\u308b\u821e\u3044\u3092\u5909\u66f4\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>10\u6587\u5b57\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u30925\u500b\u4f5c\u308b<\/h3>\n<pre><code class=\"language-bash\">$ more \/dev\/urandom  | tr -d -c '[:alnum:]' | fold -w 10 | head -5\n55aQCmeQMV\nsG8mUeX6j5\nlfUAZwHDei\nmLhV6xS7cK\n2HvVkxYMCD\n<\/code><\/pre>\n<h3>16\u6587\u5b57\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f5c\u308b<\/h3>\n<pre><code class=\"language-bash\">more \/dev\/urandom  | tr -d -c '[:alnum:]' | fold -w 16 | head -1\ne3DxTtUe6m1O0qnE\n<\/code><\/pre>\n<h3>\u6570\u5b57\u3060\u3051\u306e8\u6841\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f5c\u308b<\/h3>\n<pre><code class=\"language-bash\">$ more \/dev\/urandom  | tr -d -c '[:digit:]' | fold -w 8 | head -1\n66794094\n<\/code><\/pre>\n<h3>\u8a18\u53f7\u3082\u542b\u3081\u305f32\u6841\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f5c\u308b<\/h3>\n<pre><code class=\"language-bash\">$ more \/dev\/urandom  | tr -d -c '[:graph:]' | fold -w 32 | head -1\n73Q?JbX(Tqb&amp;P*7F~6PIrJtIM[\\\/[?Hy\n<\/code><\/pre>\n<h3>1\uff5e5\u3068#,$,!\u3060\u3051\u3067\u69cb\u6210\u3055\u308c\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f5c\u308b<\/h3>\n<pre><code class=\"language-bash\">$ more \/dev\/urandom  | tr -d -c '12345#$!' | fold -w 10 | head -1\n5!$13!3##!\n<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u3088\u3046\u306a\u5f62\u3067\u3001\u30d1\u30a4\u30d7\u3067\u5b9f\u884c\u3057\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8abf\u6574\u3057\u3066\u3001\u671b\u3093\u3060\u751f\u6210\u30eb\u30fc\u30eb\u306b\u5408\u81f4\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f5c\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u306e\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u51e6\u7406\u3092\u81ea\u52d5\u5316\u3059\u308b\u6642\u3001\u521d\u671f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30e9\u30f3\u30c0\u30e0\u306a\u5024\u3067\u30bb\u30c3\u30c8\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u3088\u3046\u306a\u5834\u5408\u3001Linux\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b\/dev\/urandom\u3092\u5229\u7528\u3059\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002 \/dev\/urand [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":750,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[23],"tags":[97,98,96,95,94],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/akamist.com\/blog\/wp-content\/uploads\/2017\/10\/icon_linux.png","jetpack-related-posts":[{"id":1088,"url":"https:\/\/akamist.com\/blog\/archives\/1088","url_meta":{"origin":1069,"position":0},"title":"MySQL5.7\u306e\u521d\u671f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u975e\u5bfe\u8a71\u3067\u5909\u66f4\u3059\u308b","date":"2017\u5e7411\u670818\u65e5","format":false,"excerpt":"MySQL\u306f\u3001\u30d0\u30fc\u30b8\u30e7\u30f35.7\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u306b\u3001root\u30e6\u30fc\u30b6\u306e\u521d\u671f\u30d1\u30b9\u30ef\u30fc\u30c9\u3068\u3057\u3066\u30e9\u30f3\u30c0\u30e0\u6587\u2026","rel":"","context":"MySQL","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/akamist.com\/blog\/wp-content\/uploads\/2017\/10\/icon_mysql.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":672,"url":"https:\/\/akamist.com\/blog\/archives\/672","url_meta":{"origin":1069,"position":1},"title":"[Linux]sed\u3067URL\u3092\u7f6e\u63db\u3059\u308b\u65b9\u6cd5(\u30b9\u30e9\u30c3\u30b7\u30e5\u3092\u542b\u3080\u6587\u5b57\u5217\u7f6e\u63db\u3092\u7c21\u5358\u306b\u884c\u3046)","date":"2017\u5e7410\u670813\u65e5","format":false,"excerpt":"Linux\u3067\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u3066\u3044\u3066\u3001\u5909\u6570\u306b\u683c\u7d0d\u3055\u308c\u305f\u5024\u3067URL\u3092sed\u3067\u7f6e\u63db\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u2026","rel":"","context":"Linux","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/akamist.com\/blog\/wp-content\/uploads\/2017\/10\/icon_linux.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":5535,"url":"https:\/\/akamist.com\/blog\/archives\/5535","url_meta":{"origin":1069,"position":2},"title":"mac cli\u3067rss\u306exml\u3092\u30d1\u30fc\u30b9\u3059\u308b","date":"2022\u5e746\u67087\u65e5","format":false,"excerpt":"macOS\u306ecli\u30b3\u30de\u30f3\u30c9\u3067\u3001rss\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306exml\u30d5\u30a1\u30a4\u30eb\u3092\u30d1\u30fc\u30b9\u3057\u3066\u30bf\u30a4\u30c8\u30eb\u3060\u3051\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u2026","rel":"","context":"\u672a\u5206\u985e","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3390,"url":"https:\/\/akamist.com\/blog\/archives\/3390","url_meta":{"origin":1069,"position":3},"title":"Ansible\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3069\u306e\u6a5f\u5bc6\u60c5\u5831\u3092\u6697\u53f7\u5316\u3057\u3066\u7ba1\u7406\u3059\u308b","date":"2018\u5e7411\u670825\u65e5","format":false,"excerpt":"Ansible\u3067\u30b5\u30fc\u30d0\u3092\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u3059\u308b\u969b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3069\u306e\u53d6\u308a\u6271\u3044\u306b\u6ce8\u610f\u3092\u8981\u3059\u308b\u2026","rel":"","context":"Ansible","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/akamist.com\/blog\/wp-content\/uploads\/2017\/06\/icon_ansible.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":934,"url":"https:\/\/akamist.com\/blog\/archives\/934","url_meta":{"origin":1069,"position":4},"title":"[cmder]ls\u30b3\u30de\u30f3\u30c9\u3067\u65e5\u672c\u8a9e\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u6587\u5b57\u5316\u3051\u3092\u89e3\u6d88\u3059\u308b","date":"2017\u5e7411\u670812\u65e5","format":false,"excerpt":"Cmder\u3067\u306f\u6a19\u6e96\u3067git for windows\u304c\u5229\u7528\u3067\u304d\u308b\u306e\u3067\u3001\u7279\u5225\u306a\u8a2d\u5b9a\u3092\u884c\u308f\u306a\u304f\u3066\u3082unix\u2026","rel":"","context":"Windows","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/akamist.com\/blog\/wp-content\/uploads\/2017\/10\/20171028_000198.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":689,"url":"https:\/\/akamist.com\/blog\/archives\/689","url_meta":{"origin":1069,"position":5},"title":"[MySQL]root\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5fd8\u308c\u305f\u3068\u304d\u306e\u30ea\u30bb\u30c3\u30c8\u65b9\u6cd5","date":"2017\u5e7410\u670827\u65e5","format":false,"excerpt":"MySQL\u3067root\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5fd8\u308c\u305f\u3068\u304d\u306b\u3001\u30ea\u30bb\u30c3\u30c8\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002 mysqld\u3092\u8d77\u52d5\u3059\u308b\u6642\u306b-\u2026","rel":"","context":"MySQL","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/akamist.com\/blog\/wp-content\/uploads\/2017\/10\/icon_mysql.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/akamist.com\/blog\/wp-json\/wp\/v2\/posts\/1069"}],"collection":[{"href":"https:\/\/akamist.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/akamist.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/akamist.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/akamist.com\/blog\/wp-json\/wp\/v2\/comments?post=1069"}],"version-history":[{"count":4,"href":"https:\/\/akamist.com\/blog\/wp-json\/wp\/v2\/posts\/1069\/revisions"}],"predecessor-version":[{"id":1073,"href":"https:\/\/akamist.com\/blog\/wp-json\/wp\/v2\/posts\/1069\/revisions\/1073"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/akamist.com\/blog\/wp-json\/wp\/v2\/media\/750"}],"wp:attachment":[{"href":"https:\/\/akamist.com\/blog\/wp-json\/wp\/v2\/media?parent=1069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/akamist.com\/blog\/wp-json\/wp\/v2\/categories?post=1069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/akamist.com\/blog\/wp-json\/wp\/v2\/tags?post=1069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}