{"id":105,"date":"2023-03-09T11:49:31","date_gmt":"2023-03-09T03:49:31","guid":{"rendered":"https:\/\/www.aqrboyblog.top\/?p=105"},"modified":"2024-09-08T12:47:25","modified_gmt":"2024-09-08T04:47:25","slug":"centos%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/www.aqrboyblog.top\/?p=105","title":{"rendered":"centos\u547d\u4ee4"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u9632\u706b\u5899<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>1. \u4e34\u65f6\u5173\u95ed\u9632\u706b\u5899\n\u8981\u7acb\u5373\u5173\u95ed\u9632\u706b\u5899\uff08\u4e0d\u9700\u8981\u91cd\u542f\u7cfb\u7edf\uff09\uff1a\n\nsudo systemctl stop firewalld\n\u8fd9\u5c06\u4e34\u65f6\u505c\u6b62\u9632\u706b\u5899\u670d\u52a1\u3002\n\n2. \u7981\u7528\u9632\u706b\u5899\u5f00\u673a\u542f\u52a8\n\u5982\u679c\u4f60\u5e0c\u671b\u9632\u706b\u5899\u5728\u7cfb\u7edf\u91cd\u542f\u540e\u4e5f\u4fdd\u6301\u5173\u95ed\u72b6\u6001\uff0c\u9700\u8981\u7981\u7528\u5b83\u7684\u5f00\u673a\u542f\u52a8\uff1a\n\n\nsudo systemctl disable firewalld\n3. \u68c0\u67e5\u9632\u706b\u5899\u72b6\u6001\n\u8981\u68c0\u67e5\u9632\u706b\u5899\u5f53\u524d\u7684\u8fd0\u884c\u72b6\u6001\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a\n\nsudo systemctl status firewalld\n\u5982\u679c\u663e\u793a inactive \u6216 dead\uff0c\u5219\u8868\u793a\u9632\u706b\u5899\u5df2\u6210\u529f\u5173\u95ed\u3002\n<\/code><\/pre>\n\n\n\n<p>\u6587\u4ef6\u548c\u76ee\u5f55\u64cd\u4f5c\u547d\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/home \u8fdb\u5165 \u2018\/ home\u2019 \u76ee\u5f55\u2019\ncd \u2026 \u8fd4\u56de\u4e0a\u4e00\u7ea7\u76ee\u5f55\ncd \u2026\/\u2026 \u8fd4\u56de\u4e0a\u4e24\u7ea7\u76ee\u5f55\ncd \u8fdb\u5165\u4e2a\u4eba\u7684\u4e3b\u76ee\u5f55\ncd ~user1 \u8fdb\u5165\u4e2a\u4eba\u7684\u4e3b\u76ee\u5f55\ncd - \u8fd4\u56de\u4e0a\u6b21\u6240\u5728\u7684\u76ee\u5f55\npwd \u663e\u793a\u5de5\u4f5c\u8def\u5f84\nls \u67e5\u770b\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\nls -F \u67e5\u770b\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\nls -l \u663e\u793a\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u8be6\u7ec6\u8d44\u6599\nls -a \u663e\u793a\u9690\u85cf\u6587\u4ef6\nmkdir dir1 \u521b\u5efa\u4e00\u4e2a\u53eb\u505a \u2018dir1\u2019 \u7684\u76ee\u5f55\u2019\nmkdir dir1 dir2 \u540c\u65f6\u521b\u5efa\u4e24\u4e2a\u76ee\u5f55\nmkdir -p \/tmp\/dir1\/dir2 \u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\u6811\nrm -f file1 \u5220\u9664\u4e00\u4e2a\u53eb\u505a \u2018file1\u2019 \u7684\u6587\u4ef6\u2019\nrmdir dir1 \u5220\u9664\u4e00\u4e2a\u53eb\u505a \u2018dir1\u2019 \u7684\u76ee\u5f55\u2019\nrm -rf dir1 \u5220\u9664\u4e00\u4e2a\u53eb\u505a \u2018dir1\u2019 \u7684\u76ee\u5f55\u5e76\u540c\u65f6\u5220\u9664\u5176\u5185\u5bb9\nrm -rf dir1 dir2 \u540c\u65f6\u5220\u9664\u4e24\u4e2a\u76ee\u5f55\u53ca\u5b83\u4eec\u7684\u5185\u5bb9\nmv dir1 new_dir \u91cd\u547d\u540d\/\u79fb\u52a8 \u4e00\u4e2a\u76ee\u5f55\ncp file1 file2 \u590d\u5236\u4e00\u4e2a\u6587\u4ef6\ncp dir\/* . \u590d\u5236\u4e00\u4e2a\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u5230\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\ncp -a \/tmp\/dir1 . \u590d\u5236\u4e00\u4e2a\u76ee\u5f55\u5230\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\ncp -a dir1 dir2 \u590d\u5236\u4e00\u4e2a\u76ee\u5f55\nln -s file1 lnk1 \u521b\u5efa\u4e00\u4e2a\u6307\u5411\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u8f6f\u94fe\u63a5\nln file1 lnk1 \u521b\u5efa\u4e00\u4e2a\u6307\u5411\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u7269\u7406\u94fe\u63a5\ntouch file1 \u521b\u5efa\u4e00\u4e2a\u6587\u4ef6<\/code><\/pre>\n\n\n\n<p>\u6587\u4ef6\u641c\u7d22\u547d\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat file1 \u4ece\u7b2c\u4e00\u4e2a\u5b57\u8282\u5f00\u59cb\u6b63\u5411\u67e5\u770b\u6587\u4ef6\u7684\u5185\u5bb9\ntac file1 \u4ece\u6700\u540e\u4e00\u884c\u5f00\u59cb\u53cd\u5411\u67e5\u770b\u4e00\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\nmore file1 \u67e5\u770b\u4e00\u4e2a\u957f\u6587\u4ef6\u7684\u5185\u5bb9\nless file1 \u7c7b\u4f3c\u4e8e \u2018more\u2019 \u547d\u4ee4\uff0c\u4f46\u662f\u5b83\u5141\u8bb8\u5728\u6587\u4ef6\u4e2d\u548c\u6b63\u5411\u64cd\u4f5c\u4e00\u6837\u7684\u53cd\u5411\u64cd\u4f5c\nhead -2 file1 \u67e5\u770b\u4e00\u4e2a\u6587\u4ef6\u7684\u524d\u4e24\u884c\ntail -2 file1 \u67e5\u770b\u4e00\u4e2a\u6587\u4ef6\u7684\u6700\u540e\u4e24\u884c 5.\u6302\u8f7d\u547d\u4ee4\nmount \/dev\/hda2 \/mnt\/hda2 \u6302\u8f7d\u4e00\u4e2a\u53eb\u505ahda2\u7684\u76d8 \uff08\u6ce8\uff1a\u786e\u5b9a\u76ee\u5f55 \u2018\/ mnt\/hda2\u2019 \u5df2\u7ecf\u5b58\u5728\uff09\numount \/dev\/hda2 \u5378\u8f7d\u4e00\u4e2a\u53eb\u505ahda2\u7684\u76d8 \uff08\u5148\u4ece\u6302\u8f7d\u70b9 \u2018\/ mnt\/hda2\u2019 \u9000\u51fa\uff09\nfuser -km \/mnt\/hda2 \u5f53\u8bbe\u5907\u7e41\u5fd9\u65f6\u5f3a\u5236\u5378\u8f7d\numount -n \/mnt\/hda2 \u8fd0\u884c\u5378\u8f7d\u64cd\u4f5c\u800c\u4e0d\u5199\u5165 \/etc\/mtab \u6587\u4ef6\uff08\u5f53\u6587\u4ef6\u4e3a\u53ea\u8bfb\u6216\u5f53\u78c1\u76d8\u5199\u6ee1\u65f6\u975e\u5e38\u6709\u7528\uff09\nmount \/dev\/fd0 \/mnt\/floppy \u6302\u8f7d\u4e00\u4e2a\u8f6f\u76d8\nmount \/dev\/cdrom \/mnt\/cdrom \u6302\u8f7d\u4e00\u4e2a\u5149\u76d8\nmount \/dev\/hdc \/mnt\/cdrecorder \u6302\u8f7d\u4e00\u4e2acdrw\u6216dvdrom\nmount \/dev\/hdb \/mnt\/cdrecorder \u6302\u8f7d\u4e00\u4e2acdrw\u6216dvdrom\nmount -o loop file.iso \/mnt\/cdrom \u6302\u8f7d\u4e00\u4e2a\u6587\u4ef6\u6216ISO\u955c\u50cf\u6587\u4ef6\nmount -t vfat \/dev\/hda5 \/mnt\/hda5 \u6302\u8f7d\u4e00\u4e2aWindows FAT32\u6587\u4ef6\u7cfb\u7edf\nmount \/dev\/sda1 \/mnt\/usbdisk \u6302\u8f7d\u4e00\u4e2ausb \u6377\u76d8\u6216\u95ea\u5b58\u8bbe\u5907\nmount -t smbfs -o username=user,password=pass \/\/WinClient\/share \/mnt\/share \u6302\u8f7d\u4e00\u4e2awindows\u7f51\u7edc\u5171\u4eab<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p class=\"text-justify\">\u9632\u706b\u5899 \u6587\u4ef6\u548c\u76ee\u5f55\u64cd\u4f5c\u547d\u4ee4 \u6587\u4ef6\u641c\u7d22\u547d\u4ee4<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-105","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.aqrboyblog.top\/index.php?rest_route=\/wp\/v2\/posts\/105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aqrboyblog.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aqrboyblog.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aqrboyblog.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aqrboyblog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=105"}],"version-history":[{"count":3,"href":"https:\/\/www.aqrboyblog.top\/index.php?rest_route=\/wp\/v2\/posts\/105\/revisions"}],"predecessor-version":[{"id":430,"href":"https:\/\/www.aqrboyblog.top\/index.php?rest_route=\/wp\/v2\/posts\/105\/revisions\/430"}],"wp:attachment":[{"href":"https:\/\/www.aqrboyblog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aqrboyblog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aqrboyblog.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}