{"id":134,"date":"2024-03-01T09:02:44","date_gmt":"2024-03-01T01:02:44","guid":{"rendered":"http:\/\/esufy.com\/?p=134"},"modified":"2024-03-17T20:34:46","modified_gmt":"2024-03-17T12:34:46","slug":"linux-%e5%91%bd%e4%bb%a4%e8%a1%8c%e9%80%9f%e6%9f%a5%e8%a1%a8","status":"publish","type":"post","link":"http:\/\/www.esufy.cn\/?p=134","title":{"rendered":"Linux \u547d\u4ee4\u884c\u901f\u67e5\u8868"},"content":{"rendered":"\r\n<h2>\u7cfb\u7edf<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>uname<\/td>\r\n<td>\u663e\u793alinux\u7cfb\u7edf\u4fe1\u606f<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>uname -r<\/td>\r\n<td>\u663e\u793a\u5185\u6838\u7248\u672c\u4fe1\u606f<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>uptime<\/td>\r\n<td>\u663e\u793a\u7cfb\u7edf\u8fd0\u884c\u7684\u65f6\u95f4\uff08\u5305\u62ec\u5e73\u5747\u8d1f\u8f7d\uff09<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>hostname<\/td>\r\n<td>\u663e\u793a\u7cfb\u7edf\u4e3b\u673a\u540d<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>hostname -i<\/td>\r\n<td>\u663e\u793a\u7cfb\u7edf\u7684IP\u5730\u5740<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>last reboot<\/td>\r\n<td>\u663e\u793a\u7cfb\u7edf\u91cd\u65b0\u542f\u52a8\u5386\u53f2\u8bb0\u5f55<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>date<\/td>\r\n<td>\u663e\u793a\u5f53\u524d\u7cfb\u7edf\u65e5\u671f\u548c\u65f6\u95f4<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>timedatectl<\/td>\r\n<td>\u67e5\u8be2\u548c\u66f4\u6539\u7cfb\u7edf\u65f6\u949f<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>cal<\/td>\r\n<td>\u663e\u793a\u5f53\u524d\u65e5\u5386\u7684\u6708\u4efd\u548c\u65e5\u671f<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>w<\/td>\r\n<td>\u663e\u793a\u7cfb\u7edf\u4e2d\u5f53\u524d\u767b\u5f55\u7684\u7528\u6237<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>whoami<\/td>\r\n<td>\u663e\u793a\u60a8\u7684\u767b\u5f55\u8eab\u4efd<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>finger username<\/td>\r\n<td>\u663e\u793a\u6709\u5173\u7528\u6237\u7684\u4fe1\u606f<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u786c\u4ef6<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>dmesg<\/td>\r\n<td>\u663e\u793a\u542f\u52a8\u6d88\u606f<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>cat \/proc\/cpuinfo<\/td>\r\n<td>\u663e\u793a\u6709\u5173CPU\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u4f8b\u5982\u578b\u53f7\u3001\u578b\u53f7\u540d\u79f0\u3001\u6838\u5fc3\u3001\u5382\u5546\u6807\u8bc6<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>cat \/proc\/meminfo<\/td>\r\n<td>\u663e\u793a\u6709\u5173\u786c\u4ef6\u5185\u5b58\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u4f8b\u5982\u603b\u5185\u5b58\u548c\u53ef\u7528\u5185\u5b58<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>lshw<\/td>\r\n<td>\u663e\u793a\u6709\u5173\u7cfb\u7edf\u786c\u4ef6\u914d\u7f6e\u7684\u4fe1\u606f<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>lsblk<\/td>\r\n<td>\u663e\u793a\u5757\u8bbe\u5907\u76f8\u5173\u4fe1\u606f<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>free -m<\/td>\r\n<td>\u663e\u793a\u7cfb\u7edf\u4e2d\u7a7a\u95f2\u548c\u4f7f\u7528\u7684\u5185\u5b58(-m\u6807\u5fd7\u8868\u793a\u5185\u5b58(MB))<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>lspci -tv<\/td>\r\n<td>\u5728\u6811\u72b6\u56fe\u4e2d\u663e\u793aPCI\u8bbe\u5907<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>lsusb -tv<\/td>\r\n<td>\u4ee5\u6811\u72b6\u56fe\u7684\u5f62\u5f0f\u663e\u793aUSB\u8bbe\u5907<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>dmidecode<\/td>\r\n<td>\u663e\u793aBIOS\u4e2d\u7684\u786c\u4ef6\u4fe1\u606f<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>hdparm -i \/dev\/xda<\/td>\r\n<td>\u663e\u793a\u6709\u5173\u78c1\u76d8\u6570\u636e\u7684\u4fe1\u606f<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>hdparm -tT \/dev\/xda &lt;:code&gt;<\/td>\r\n<td>\u5728\u8bbe\u5907xda\u4e0a\u8fdb\u884c\u8bfb\u901f\u5ea6\u6d4b\u8bd5<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>badblocks -s \/dev\/xda<\/td>\r\n<td>\u6d4b\u8bd5\u78c1\u76d8\u4e0a\u4e0d\u53ef\u8bfb\u7684\u5757<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u7528\u6237<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>id<\/td>\r\n<td>\u663e\u793a\u6d3b\u52a8\u7528\u6237\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5982uid\u3001gid\u548c\u7ec4<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>last<\/td>\r\n<td>\u663e\u793a\u7cfb\u7edf\u4e2d\u7684\u6700\u540e\u4e00\u6b21\u767b\u5f55<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>who<\/td>\r\n<td>\u663e\u793a\u8c01\u5df2\u767b\u5f55\u5230\u7cfb\u7edf<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>groupadd \u201cadmin\u201d<\/td>\r\n<td>\u6dfb\u52a0\u7ec4\u201cadmin\u201d<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>adduser \u201cSam\u201d<\/td>\r\n<td>\u6dfb\u52a0\u7528\u6237 Sam<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>userdel \u201cSam\u201d<\/td>\r\n<td>\u5220\u9664\u7528\u6237 Sam<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>usermod<\/td>\r\n<td>\u7528\u4e8e\u66f4\u6539\/\u4fee\u6539\u7528\u6237\u4fe1\u606f<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u6587\u4ef6<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>ls -al<\/td>\r\n<td>\u5217\u51fa\u6587\u4ef6-\u5305\u62ec\u5e38\u89c4\u6587\u4ef6\u548c\u9690\u85cf\u6587\u4ef6\u4ee5\u53ca\u5b83\u4eec\u7684\u6743\u9650<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>pwd<\/td>\r\n<td>\u663e\u793a\u5f53\u524d\u76ee\u5f55\u6587\u4ef6\u8def\u5f84<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>mkdir \u2018directory_name\u2019<\/td>\r\n<td>\u521b\u5efa\u4e00\u4e2a\u65b0\u76ee\u5f55<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>rm file_name<\/td>\r\n<td>\u5220\u9664\u4e00\u4e2a\u6587\u4ef6<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>rm -f filename<\/td>\r\n<td>\u5f3a\u5236\u5220\u9664\u6587\u4ef6<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>rm -r directory_name<\/td>\r\n<td>\u9012\u5f52\u5730\u5220\u9664\u4e00\u4e2a\u76ee\u5f55<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>rm -rf directory_name<\/td>\r\n<td>\u5f3a\u5236\u5e76\u9012\u5f52\u5730\u5220\u9664\u4e00\u4e2a\u76ee\u5f55<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>cp file1 file2<\/td>\r\n<td>\u5c06file1\u7684\u5185\u5bb9\u590d\u5236\u5230file2<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>cp -r dir1 dir2<\/td>\r\n<td>\u9012\u5f52\u5730\u5c06dir1\u590d\u5236\u5230dir2\u3002\u5982\u679cdir2\u4e0d\u5b58\u5728\uff0c\u5219\u521b\u5efa\u5b83<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>mv file1 file2<\/td>\r\n<td>\u5c06file1\u91cd\u547d\u540d\u4e3afile2<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>ln -s \/path\/to\/file_name link_name<\/td>\r\n<td>\u521b\u5efa\u5230file_name\u7684\u8f6f\u94fe\u63a5<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>touch file_name<\/td>\r\n<td>\u521b\u5efa\u4e00\u4e2a\u65b0\u6587\u4ef6<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>cat &gt; file_name<\/td>\r\n<td>\u4ece\u952e\u76d8\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>more file_name<\/td>\r\n<td>\u8f93\u51fa\u6587\u4ef6\u7684\u5185\u5bb9<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>head file_name<\/td>\r\n<td>\u663e\u793a\u6587\u4ef6\u7684\u524d10\u884c<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>tail file_name<\/td>\r\n<td>\u663e\u793a\u6587\u4ef6\u7684\u6700\u540e10\u884c<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>gpg -c file_name<\/td>\r\n<td>\u52a0\u5bc6\u4e00\u4e2a\u6587\u4ef6<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>gpg file_name.gpg<\/td>\r\n<td>\u89e3\u5bc6\u6587\u4ef6<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>wc<\/td>\r\n<td>\u6253\u5370\u6587\u4ef6\u4e2d\u7684\u5b57\u8282\u3001\u5355\u8bcd\u548c\u884c\u6570<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>xargs<\/td>\r\n<td>\u4ece\u6807\u51c6\u8f93\u5165\u6267\u884c\u547d\u4ee4<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u8fdb\u7a0b<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>ps<\/td>\r\n<td>\u663e\u793a\u5f53\u524d\u6d3b\u52a8\u7684\u8fdb\u7a0b<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>ps aux | grep \u2018telnet\u2019<\/td>\r\n<td>\u641c\u7d22\u8fdb\u7a0b\u2019telnet\u2019\u7684id<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>pmap<\/td>\r\n<td>\u663e\u793a\u8fdb\u7a0b\u7684\u5185\u5b58\u6620\u5c04<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>top<\/td>\r\n<td>\u663e\u793a\u6240\u6709\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>kill pid<\/td>\r\n<td>\u4f7f\u7528\u7ed9\u5b9a\u7684pid\u7ec8\u6b62\u8fdb\u7a0b<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>killall proc<\/td>\r\n<td>\u6740\u6b7b\/\u7ec8\u6b62\u6240\u6709\u540d\u4e3aproc\u7684\u8fdb\u7a0b<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>pkill process-name<\/td>\r\n<td>\u5411\u5177\u6709\u5176\u540d\u79f0\u7684\u8fdb\u7a0b\u53d1\u9001\u4fe1\u53f7<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>bg<\/td>\r\n<td>\u5c06\u4e00\u4e2a\u5728\u540e\u53f0\u6682\u505c\u7684\u547d\u4ee4\uff0c\u53d8\u6210\u7ee7\u7eed\u6267\u884c<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>fg<\/td>\r\n<td>\u5c06\u540e\u53f0\u4e2d\u7684\u547d\u4ee4\u8c03\u81f3\u524d\u53f0\u7ee7\u7eed\u8fd0\u884c<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>fg n<\/td>\r\n<td>job n to the foreground<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>lsof<\/td>\r\n<td>\u5217\u51fa\u8fdb\u7a0b\u6253\u5f00\u7684\u6587\u4ef6<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>renice 19 PID<\/td>\r\n<td>\u4f7f\u8fdb\u7a0b\u4ee5\u975e\u5e38\u4f4e\u7684\u4f18\u5148\u7ea7\u8fd0\u884c<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>pgrep firefox<\/td>\r\n<td>\u67e5\u627eFirefox\u8fdb\u7a0bID<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>pstree<\/td>\r\n<td>\u5728\u6811\u6a21\u578b\u4e2d\u53ef\u89c6\u5316\u8fc7\u7a0b<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u6587\u4ef6\u6743\u9650<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>chmod octal filename<\/td>\r\n<td>\u5c06\u6587\u4ef6\u6743\u9650\u66f4\u6539\u4e3a\u516b\u8fdb\u5236<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>chmod 777 \/data\/test.c<\/td>\r\n<td>\u5c06rwx\u6743\u9650\u8bbe\u7f6e\u4e3aowner\u3001group\u548ceveryone(\u5176\u4ed6\u53ef\u4ee5\u8bbf\u95ee\u670d\u52a1\u5668\u7684\u4eba)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>chmod 755 \/data\/test.c<\/td>\r\n<td>\u5c06rwx\u8bbe\u7f6e\u4e3a\u6240\u6709\u8005\uff0c\u5c06r_x\u8bbe\u7f6e\u4e3a\u7ec4\u548c\u6240\u6709\u4eba<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>chmod 766 \/data\/test.c<\/td>\r\n<td>\u4e3a\u6240\u6709\u8005\u8bbe\u7f6erwx\uff0c\u4e3a\u7ec4\u548c\u6bcf\u4e2a\u4eba\u8bbe\u7f6erw<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>chown owner user-file<\/td>\r\n<td>\u66f4\u6539\u6587\u4ef6\u7684\u6240\u6709\u6743<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>chown owner-user:owner-group file_name<\/td>\r\n<td>\u66f4\u6539\u6587\u4ef6\u7684\u6240\u6709\u8005\u548c\u7ec4\u6240\u6709\u8005<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>chown owner-user:owner-group directory<\/td>\r\n<td>\u66f4\u6539\u76ee\u5f55\u7684\u6240\u6709\u8005\u548c\u7ec4\u6240\u6709\u8005<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u7f51\u7edc<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>ip addr show<\/td>\r\n<td>\u663e\u793aIP\u5730\u5740\u548c\u6240\u6709\u7f51\u7edc\u63a5\u53e3<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>ip address add 192.168.0.1\/24 dev eth0<\/td>\r\n<td>\u5c06IP\u5730\u5740192.168.0.1\u5206\u914d\u7ed9\u63a5\u53e3eth0<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>ifconfig<\/td>\r\n<td>\u663e\u793a\u6240\u6709\u7f51\u7edc\u63a5\u53e3\u7684IP\u5730\u5740<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>ping host<\/td>\r\n<td>ping\u547d\u4ee4\u53d1\u9001ICMP\u56de\u9001\u8bf7\u6c42\u4ee5\u5efa\u7acb\u5230\u670d\u52a1\u5668\/PC\u7684\u8fde\u63a5<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>whois domain<\/td>\r\n<td>\u68c0\u7d22\u6709\u5173\u57df\u540d\u7684\u66f4\u591a\u4fe1\u606f<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>dig domain<\/td>\r\n<td>\u68c0\u7d22\u5173\u4e8e\u57df\u7684DNS\u4fe1\u606f<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>dig -x host<\/td>\r\n<td>\u5bf9\u57df\u6267\u884c\u53cd\u5411\u67e5\u627e<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>host google.com<\/td>\r\n<td>\u6267\u884c\u57df\u540d\u7684IP\u67e5\u627e<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>hostname -i<\/td>\r\n<td>\u663e\u793a\u672c\u5730IP\u5730\u5740<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>wget file_name<\/td>\r\n<td>\u4ece\u5728\u7ebf\u8d44\u6e90\u4e0b\u8f7d\u6587\u4ef6<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>netstat -pnltu<\/td>\r\n<td>\u663e\u793a\u6240\u6709\u6d3b\u52a8\u76d1\u542c\u7aef\u53e3<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u538b\u7f29\/\u6253\u5305<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>tar -cf home.tar home&lt;:code&gt;<\/td>\r\n<td>\u521b\u5efa\u540d\u4e3a\u201chome\u201d\u7684\u5b58\u6863\u6587\u4ef6\u3002tar\u6587\u4ef6\u2019home&#8217;<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>tar -xf files.tar<\/td>\r\n<td>\u89e3\u538b\u6863\u6848\u6587\u4ef6\u201cfiles.tar\u201d<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>tar -zcvf home.tar.gz source-folder<\/td>\r\n<td>\u4ece\u6e90\u6587\u4ef6\u5939\u521b\u5efa\u538b\u7f29\u7684tar\u5b58\u6863\u6587\u4ef6<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>gzip file<\/td>\r\n<td>\u538b\u7f29\u6269\u5c55\u540d\u4e3a.gz\u7684\u6587\u4ef6<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u5b89\u88c5\u5305<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>rpm -i pkg_name.rpm<\/td>\r\n<td>\u5b89\u88c5rpm\u5305<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>rpm -e pkg_name<\/td>\r\n<td>\u5220\u9664rpm\u5305<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>dnf install pkg_name<\/td>\r\n<td>\u4f7f\u7528dnf\u5de5\u5177\u5b89\u88c5\u8f6f\u4ef6\u5305<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u5b89\u88c5\u6e90(\u7f16\u8bd1)<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>.\/configure<\/td>\r\n<td>\u68c0\u67e5\u7cfb\u7edf\uff0c\u4ee5\u83b7\u5f97\u6784\u5efa\u7a0b\u5e8f\u6240\u9700\u7684\u8f6f\u4ef6\u3002\u5b83\u5c06\u6784\u5efa\u5305\u542b\u6709\u6548\u6784\u5efa\u9879\u76ee\u6240\u9700\u7684\u6307\u4ee4\u7684Makefile<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>make<\/td>\r\n<td>\u00a0<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>make install<\/td>\r\n<td>\u7f16\u8bd1\u540e\uff0c\u8be5\u547d\u4ee4\u5c06\u4e8c\u8fdb\u5236\u6587\u4ef6\u5b89\u88c5\u5728\u9ed8\u8ba4\/\u4fee\u6539\u7684\u8def\u5f84\u4e2d<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u641c\u7d22<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>grep \u2018pattern\u2019 files<\/td>\r\n<td>\u5728\u6587\u4ef6\u4e2d\u641c\u7d22\u7ed9\u5b9a\u7684\u6a21\u5f0f<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>grep -r pattern dir<\/td>\r\n<td>Search recursively for a pattern in a given directory<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>locate file<\/td>\r\n<td>\u67e5\u627e\u6587\u4ef6\u7684\u6240\u6709\u5b9e\u4f8b<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>find \/home\/ -name \u201cindex\u201d<\/td>\r\n<td>\u5728\/home\u6587\u4ef6\u5939\u4e2d\u67e5\u627e\u4ee5\u2019index\u2019\u5f00\u5934\u7684\u6587\u4ef6\u540d<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>find \/home -size +10000k<\/td>\r\n<td>\u5728\u4e3b\u6587\u4ef6\u5939\u4e2d\u67e5\u627e\u5927\u4e8e10000k\u7684\u6587\u4ef6<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u767b\u9646<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>ssh user@host<\/td>\r\n<td>\u4f7f\u7528\u6307\u5b9a\u7528\u6237\u5b89\u5168\u8fde\u63a5\u5230\u4e3b\u673a<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>ssh -p port_number user@host<\/td>\r\n<td>\u4f7f\u7528\u6307\u5b9a\u7aef\u53e3\u5b89\u5168\u5730\u8fde\u63a5\u5230\u4e3b\u673a<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>ssh host<\/td>\r\n<td>\u901a\u8fc7SSH\u9ed8\u8ba4\u7aef\u53e322\u5b89\u5168\u8fde\u63a5\u5230\u7cfb\u7edf<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>telnet host<\/td>\r\n<td>\u901a\u8fc7telnet\u9ed8\u8ba4\u7aef\u53e323\u8fde\u63a5\u5230\u4e3b\u673a<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u6587\u4ef6\u4f20\u8f93<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>scp file1.txt server2\/tmp<\/td>\r\n<td>\u5b89\u5168\u5730\u5c06file1.txt\u590d\u5236\u5230\/tmp\u76ee\u5f55\u4e2d\u7684server2<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>rsync -a \/home\/apps \/backup\/<\/td>\r\n<td>\u5c06\/home\/apps\u76ee\u5f55\u4e2d\u7684\u5185\u5bb9\u4e0e\/backup\u76ee\u5f55\u8fdb\u884c\u540c\u6b65<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u78c1\u76d8\u4f7f\u7528\u60c5\u51b5<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>df -h<\/td>\r\n<td>\u663e\u793a\u5b89\u88c5\u7cfb\u7edf\u4e0a\u7684\u7a7a\u95f2\u7a7a\u95f4<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>df -i<\/td>\r\n<td>\u663e\u793a\u6587\u4ef6\u7cfb\u7edf\u4e0a\u7684\u7a7a\u95f2inode<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>fdisk -l<\/td>\r\n<td>\u663e\u793a\u78c1\u76d8\u5206\u533a\u3001\u5927\u5c0f\u548c\u7c7b\u578b<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>du -sh<\/td>\r\n<td>\u4ee5\u4eba\u7c7b\u53ef\u8bfb\u7684\u683c\u5f0f\u663e\u793a\u5f53\u524d\u76ee\u5f55\u4e2d\u7684\u78c1\u76d8\u4f7f\u7528\u60c5\u51b5<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>findmnt<\/td>\r\n<td>\u663e\u793a\u6240\u6709\u6587\u4ef6\u7cfb\u7edf\u7684\u76ee\u6807\u6302\u8f7d\u70b9<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>mount device-path mount-point<\/td>\r\n<td>\u6302\u8f7d\u8bbe\u5907<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<h2>\u76ee\u5f55\u904d\u5386<\/h2>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>\u00a0<\/th>\r\n<th>\u00a0<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>cd ..<\/td>\r\n<td>\u5728\u76ee\u5f55\u6811\u7ed3\u6784\u4e2d\u5411\u4e0a\u79fb\u52a8\u4e00\u5c42<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>cd<\/td>\r\n<td>\u5c06\u76ee\u5f55\u66f4\u6539\u4e3a$HOME\u76ee\u5f55<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>cd \/test<\/td>\r\n<td>\u5c06\u76ee\u5f55\u66f4\u6539\u4e3a\/test\u76ee\u5f55<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n","protected":false},"excerpt":{"rendered":"<p>\u7cfb\u7edf \u00a0 \u00a0 uname \u663e\u793alinux\u7cfb\u7edf\u4fe1\u606f uname -r \u663e\u793a\u5185\u6838\u7248\u672c\u4fe1\u606f uptime \u663e\u793a\u7cfb\u7edf\u8fd0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":303,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[29,25],"tags":[9,52],"_links":{"self":[{"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/posts\/134"}],"collection":[{"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=134"}],"version-history":[{"count":2,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/posts\/134\/revisions"}],"predecessor-version":[{"id":365,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/posts\/134\/revisions\/365"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/media\/303"}],"wp:attachment":[{"href":"http:\/\/www.esufy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=134"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}