{"id":802,"date":"2025-10-24T15:04:43","date_gmt":"2025-10-24T07:04:43","guid":{"rendered":"https:\/\/www.youvii.site\/?p=802"},"modified":"2025-10-24T15:09:25","modified_gmt":"2025-10-24T07:09:25","slug":"kalilinuxjibenmingling","status":"publish","type":"post","link":"https:\/\/www.youvii.site\/index.php\/archives\/kalilinuxjibenmingling","title":{"rendered":"Kali&#038;Linux\u57fa\u672c\u547d\u4ee4"},"content":{"rendered":"<h1>Kali&amp;Linux\u57fa\u672c\u547d\u4ee4<\/h1>\n<h1>kali<\/h1>\n<h1><font style=\"color:rgb(36, 41, 46);\"><\/h1>\n<p><\/font><font style=\"color:rgb(36, 41, 46);\">kali\u7684\u5e38\u7528\u547d\u4ee4<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">1.\u5e38\u7528\u547d\u4ee4<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">passwd \u4fee\u6539\u5bc6\u7801<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">passwd root \u4fee\u6539root\u7528\u6237\u5bc6\u7801<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">date \u663e\u793a\u7cfb\u7edf\u65e5\u671f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">sudo \u540e\u9762\u52a0\u547d\u4ee4 \u5c31\u53ef\u4ee5\u8c03\u7528\u7ba1\u7406\u6743\u9650<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">apt-get update \u66f4\u65b0\u8f6f\u4ef6\u5217\u8868<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u8fd9\u4e2a\u547d\u4ee4\uff0c\u4f1a\u8bbf\u95ee\u6e90\u5217\u8868\u91cc\u7684\u6bcf\u4e2a\u7f51\u5740\uff0c\u5e76\u8bfb\u53d6\u8f6f\u4ef6\u5217\u8868\uff0c\u7136\u540e\u4fdd\u5b58\u5728\u672c\u5730\u7535\u8111\u3002\u6211\u4eec\u5728\u65b0\u7acb\u5f97\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\u91cc\u770b\u5230\u7684\u8f6f\u4ef6\u5217\u8868\uff0c\u90fd\u662f\u901a\u8fc7update\u547d\u4ee4\u66f4\u65b0\u7684\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">apt-get upgrade \u66f4\u65b0\u8f6f\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u8fd9\u4e2a\u547d\u4ee4\uff0c\u4f1a\u628a\u672c\u5730\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\uff0c\u4e0e\u521a\u4e0b\u8f7d\u7684\u8f6f\u4ef6\u5217\u8868\u91cc\u5bf9\u5e94\u8f6f\u4ef6\u8fdb\u884c\u5bf9\u6bd4\uff0c\u5982\u679c\u53d1\u73b0\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u7248\u672c\u592a\u4f4e\uff0c\u5c31\u4f1a\u63d0\u793a\u4f60\u66f4\u65b0\u3002\u5982\u679c\u4f60\u7684\u8f6f\u4ef6\u90fd\u662f\u6700\u65b0\u7248\u672c\uff0c\u4f1a\u63d0\u793a\uff1a \u5347\u7ea7\u4e86 0 \u4e2a\u8f6f\u4ef6\u5305\uff0c\u65b0\u5b89\u88c5\u4e86 0 \u4e2a\u8f6f\u4ef6\u5305\uff0c\u8981\u5378\u8f7d 0 \u4e2a\u8f6f\u4ef6\u5305\uff0c\u6709 0 \u4e2a\u8f6f\u4ef6\u5305\u672a\u88ab\u5347\u7ea7\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">apt-get dist-upgrade \u66f4\u65b0\u8f6f\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">apt-get upgrade \u4e0e apt-get dist-upgrade \u7684\u533a\u522b<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">upgrade:\u7cfb\u7edf\u5c06\u73b0\u6709\u7684Package\u5347\u7ea7,\u5982\u679c\u6709\u76f8\u4f9d\u6027\u7684\u95ee\u9898,\u800c\u6b64\u76f8\u4f9d\u6027\u9700\u8981\u5b89\u88c5\u5176\u5b83\u65b0\u7684Package\u6216\u5f71\u54cd\u5230\u5176\u5b83Package\u7684\u76f8\u4f9d\u6027\u65f6,\u6b64Package\u5c31\u4e0d\u4f1a\u88ab\u5347\u7ea7,\u4f1a\u4fdd\u7559\u4e0b\u6765.<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">dist-upgrade:\u53ef\u4ee5\u806a\u660e\u7684\u89e3\u51b3\u76f8\u4f9d\u6027\u7684\u95ee\u9898,\u5982\u679c\u6709\u76f8\u4f9d\u6027\u95ee\u9898,\u9700\u8981\u5b89\u88c5\/\u79fb\u9664\u65b0\u7684Package,\u5c31\u4f1a\u8bd5\u7740\u53bb\u5b89\u88c5\/\u79fb\u9664\u5b83. (\u6240\u4ee5\u901a\u5e38\u8fd9\u4e2a\u4f1a\u88ab\u8ba4\u4e3a\u662f\u6709\u70b9\u98ce\u9669\u7684\u5347\u7ea7)<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">apt-get upgrade \u548c apt-get dist-upgrade \u672c\u8d28\u4e0a\u662f\u6ca1\u6709\u4ec0\u4e48\u4e0d\u540c\u7684\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u53ea\u4e0d\u8fc7\uff0cdist-upgrade \u4f1a\u8bc6\u522b\u51fa\u5f53\u4f9d\u8d56\u5173\u7cfb\u6539\u53d8\u7684\u60c5\u5f62\u5e76\u4f5c\u51fa\u5904\u7406\uff0c\u800cupgrade\u5bf9\u6b64\u60c5\u5f62\u4e0d\u5904\u7406\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u4f8b\u5982\u8f6f\u4ef6\u5305 a \u539f\u5148\u4f9d\u8d56 b c d\uff0c\u4f46\u662f\u5728\u6e90\u91cc\u9762\u53ef\u80fd\u5df2\u7ecf\u5347\u7ea7\u4e86\uff0c\u73b0\u5728\u662f a \u4f9d\u8d56 b c e\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0cdist-upgrade \u4f1a\u5220\u9664 d \u5b89\u88c5 e\uff0c\u5e76\u628a a \u8f6f\u4ef6\u5305\u5347\u7ea7\uff0c\u800c upgrade \u4f1a\u8ba4\u4e3a\u4f9d\u8d56\u5173\u7cfb\u6539\u53d8\u800c\u62d2\u7edd\u5347\u7ea7 a \u8f6f\u4ef6\u5305\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">clear \u6e05\u5c4f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">sudo gpedit \u7279\u6743\u8c03\u7528gpedit\u7f16\u8f91\u5668<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">reboot \u91cd\u542f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">apt-get install XXXXX \u5b89\u88c5\u7f3a\u5c11\u7684\u4f9d\u8d56\u5305\uff0c\uff08XXX\uff09\u91cc\u9762\u8f93\u5165\u7f3a\u5c11\u4f9d\u8d56\u5305\u7684\u540d\u5b57<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">apt-get autoremove \u2013purge \u8f6f\u4ef6\u540d \u5220\u9664\u5305\u53ca\u5176\u4f9d\u8d56\u7684\u8f6f\u4ef6\u5305+\u914d\u7f6e\u6587\u4ef6\u7b49<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">apt-get install +\u6a21\u5757\u540d \u8fd9\u79cd\u65b9\u6cd5\u4e5f\u53ef\u4ee5\u5b89\u88c5\u6a21\u5757,\u6216\u8005apt-get install python-\u6a21\u5757\u540d<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">firefox \u6d4f\u89c8\u5668\u6253\u5f00<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">shutdown -h now \u5173\u95ed\u7cfb\u7edf(1)<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">init 0 \u5173\u95ed\u7cfb\u7edf(2)<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">telinit 0 \u5173\u95ed\u7cfb\u7edf(3)<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">shutdown -h hours:minutes &amp; \u6309\u9884\u5b9a\u65f6\u95f4\u5173\u95ed\u7cfb\u7edf<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">shutdown -c \u53d6\u6d88\u6309\u9884\u5b9a\u65f6\u95f4\u5173\u95ed\u7cfb\u7edf<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">shutdown -r now \u91cd\u542f(1)<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">reboot \u91cd\u542f(2)<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">su -l \u5207\u6362\u767b\u9646\u7528\u6237<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">logout \u6ce8\u9500\u7528\u6237\u767b\u9646<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">pwd \u5f53\u524d\u8def\u5f84<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">2.\u6587\u4ef6\u5939\u6216\u6587\u672c\u64cd\u4f5c<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">cd \u2026 \u8fd4\u56de\u4e0a\u4e00\u7ea7\u76ee\u5f55<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">cd \u2026\/\u2026 \u8fd4\u56de\u4e0a\u7ea7\u4e24\u7ea7\u76ee\u5f55<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">cd &#8211; \u8fd4\u56de\u4e0a\u6b21\u6240\u5728\u7684\u76ee\u5f55<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">cd \u6587\u4ef6\u5939\u540d \u8fdb\u53bb\u6587\u4ef6\u5939<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">cd ~ \u8fdb\u53bb\u5f53\u524d\u7528\u6237\u4e3b\u76ee\u5f55<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">pwd \u663e\u793a\u5f53\u524d\u5de5\u4f5c\u8def\u5f84<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">touch \u6587\u4ef6\u540d \u5e38\u89c1\u6587\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">cat \u6587\u4ef6\u540d \u8bfb\u53d6\u6587\u6863\u5185\u5bb9<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">mkdir \u6587\u4ef6\u540d \u521b\u5efa\u6587\u4ef6\u5939<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">mkdir -p \u6587\u4ef6\u5939 \u9012\u5f52\u521b\u5efa\u6587\u4ef6\u5939<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">cp \u590d\u5236\u547d\u4ee4<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">cp -r moon moons \u590d\u5236moon \u6587\u4ef6\u5939\u5230\u5f53\u524d moons \u5982\u679c\u6709\u91cc\u9762\u6709\u6587\u4ef6 \u4f7f\u7528-r<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">mv \u79fb\u52a8\u547d\u4ee4<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">mv moon moon \u4e5f\u53ef\u4ee5\u8bf4\u662f\u6539\u540d<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">mkdir \u6587\u4ef6\u540d \u6587\u4ef6\u540d \u521b\u5efa\u591a\u4e2a\u6587\u4ef6\u5939<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">ls \u663e\u793a\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u540d<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">ls -a \u663e\u793a\u6240\u6709\u7684\u6587\u4ef6\u548c\u6587\u4ef6\u5939 \u5305\u542b\u9690\u85cf\u6587\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">ls -l \u663e\u793a\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u8be6\u7ec6\u8d44\u6599<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u5220\u9664<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">rm -f \u6587\u4ef6 \u5220\u9664\u6587\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">rm \u6587\u4ef6\u5939\u540d \u5220\u9664\u6587\u4ef6\u5939<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">rm -rf \u6587\u4ef6\/\u6587\u4ef6\u5939 \u5220\u9664\u6587\u4ef6\u5939 \u53ca\u5176\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u538b\u7f29\u548c\u89e3\u538b bzip2 file1 \u538b\u7f29\u4e00\u4e2a\u53eb\u505a \u2018file1\u2019 \u7684\u6587\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">gunzip file1.gz \u89e3\u538b\u4e00\u4e2a\u53eb\u505a \u2018file1.gz\u2019\u7684\u6587\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">gzip file1 \u538b\u7f29\u4e00\u4e2a\u53eb\u505a \u2018file1\u2019\u7684\u6587\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">gzip -9 file1 \u6700\u5927\u7a0b\u5ea6\u538b\u7f29<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">rar a file1.rar test_file \u521b\u5efa\u4e00\u4e2a\u53eb\u505a \u2018file1.rar\u2019 \u7684\u5305<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">rar x file1.rar \u89e3\u538brar\u5305<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">unrar x file1.rar \u89e3\u538brar\u5305<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">DEB \u5305 (Debian, Ubuntu \u4ee5\u53ca\u7c7b\u4f3c\u7cfb\u7edf) dpkg -i package.deb \u5b89\u88c5\/\u66f4\u65b0\u4e00\u4e2a deb \u5305<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">dpkg -r package_name \u4ece\u7cfb\u7edf\u5220\u9664\u4e00\u4e2a deb \u5305<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">dpkg -l \u663e\u793a\u7cfb\u7edf\u4e2d\u6240\u6709\u5df2\u7ecf\u5b89\u88c5\u7684 deb \u5305<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">dpkg -l | grep httpd \u663e\u793a\u6240\u6709\u540d\u79f0\u4e2d\u5305\u542b \u201chttpd\u201d \u5b57\u6837\u7684deb\u5305<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">dpkg -s package_name \u83b7\u5f97\u5df2\u7ecf\u5b89\u88c5\u5728\u7cfb\u7edf\u4e2d\u4e00\u4e2a\u7279\u6b8a\u5305\u7684\u4fe1\u606f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">dpkg -L package_name \u663e\u793a\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u5b89\u88c5\u7684\u4e00\u4e2adeb\u5305\u6240\u63d0\u4f9b\u7684\u6587\u4ef6\u5217\u8868<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">dpkg \u2013contents package.deb \u663e\u793a\u5c1a\u672a\u5b89\u88c5\u7684\u4e00\u4e2a\u5305\u6240\u63d0\u4f9b\u7684\u6587\u4ef6\u5217\u8868<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">tar zcvf +\u538b\u7f29\u6587\u4ef6\u540d \u538b\u7f29\u6587\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">tar zxvf +\u89e3\u538b\u5305\u540d \u89e3\u538b\u6587\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">tar -jcvf renwolesshel.tar.bz2 \u6253\u5305<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">tar jxvf renwolesshel.tar.bz2 \u89e3\u538b<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u538b\u7f29\u6210zip\u683c\u5f0f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">zip -q -r renwolesshel.zip renwolesshel\/ \u89e3\u538bzip\u683c\u5f0f\u7684\u538b\u7f29\u5305<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">unzip renwolesshel.zip<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">which \u52a0\u8f6f\u4ef6\u540d \u53ef\u4ee5\u67e5\u51fa\u8f6f\u4ef6\u76ee\u5f55\u5728\u54ea<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">.\/+\u6587\u4ef6\u540d\u6216\u8005apt-get +\u6587\u4ef6\u540d \u5b89\u88c5\u6587\u4ef6<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">3.\u7cfb\u7edf\u4fe1\u606f<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">arch \u663e\u793a\u673a\u5668\u7684\u5904\u7406\u5668\u67b6\u6784(1)<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">uname -m \u663e\u793a\u673a\u5668\u7684\u5904\u7406\u5668\u67b6\u6784(2)<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">uname -r \u663e\u793a\u6b63\u5728\u4f7f\u7528\u7684\u5185\u6838\u7248\u672c<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">cat \/proc\/version \u663e\u793a\u5185\u6838\u7684\u7248\u672c<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">cat \/proc\/net\/dev \u663e\u793a\u7f51\u7edc\u9002\u914d\u5668\u53ca\u7edf\u8ba1<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">cat \/proc\/cpuinfo \u663e\u793aCPU info\u7684\u4fe1\u606f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">cat \/proc\/mounts \u663e\u793a\u5df2\u52a0\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf<\/font><\/p>\n<h2><a href=\"http:\/\/4.vi\/\"><font style=\"color:rgb(3, 102, 214);\">4.vi<\/font><\/a><font style=\"color:rgb(36, 41, 46);\"> <\/font><font style=\"color:rgb(36, 41, 46);\">\u5e38\u7528\u547d\u4ee4<\/font><\/h2>\n<h2><font style=\"color:rgb(36, 41, 46);\">vi\u7f16\u8f91\u5668\u7684\u6982\u5ff5<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">vi\u7f16\u8f91\u5668\u5206\u4e3a\u4e09\u79cd\u72b6\u6001\uff0c\u5206\u522b\u662f\uff1a 1.\u547d\u4ee4\u6a21\u5f0f\uff08command mode\uff09 \u63a7\u5236\u5c4f\u5e55\u5149\u6807\u7684\u79fb\u52a8\uff0c\u5b57\u7b26\u3001\u5b57\u6216\u884c\u7684\u5220\u9664\uff0c\u79fb\u52a8\u590d\u5236\u67d0\u533a\u6bb5\u53ca\u8fdb\u5165Insert mode\u4e0b\uff0c\u6216\u8005\u5230 last line mode\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">2.\u63d2\u5165\u6a21\u5f0f\uff08Insert mode\uff09<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u53ea\u6709\u5728Insert mode\u4e0b\uff0c\u624d\u53ef\u4ee5\u505a\u6587\u5b57\u8f93\u5165\uff0c\u6309\u300cESC\u300d\u952e\u53ef\u56de\u5230\u547d\u4ee4\u884c\u6a21\u5f0f\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">3.\u5e95\u884c\u6a21\u5f0f\uff08last line mode\uff09<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u5c06\u6587\u4ef6\u4fdd\u5b58\u6216\u9000\u51favi\uff0c\u4e5f\u53ef\u4ee5\u8bbe\u7f6e\u7f16\u8f91\u73af\u5883\uff0c\u5982\u5bfb\u627e\u5b57\u7b26\u4e32\u3001\u5217\u51fa\u884c\u53f7\u2026\u2026\u7b49\u3002<\/font><\/p>\n<p><strong><font style=\"color:rgb(36, 41, 46);\">\u6253\u5f00<\/font><\/strong><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">vi filename :\u6253\u5f00\u6216\u65b0\u5efa\u6587\u4ef6\uff0c\u5e76\u5c06\u5149\u6807\u7f6e\u4e8e\u7b2c\u4e00\u884c\u9996 vi +n filename \uff1a\u6253\u5f00\u6587\u4ef6\uff0c\u5e76\u5c06\u5149\u6807\u7f6e\u4e8e\u7b2cn\u884c\u9996 vi + filename \uff1a\u6253\u5f00\u6587\u4ef6\uff0c\u5e76\u5c06\u5149\u6807\u7f6e\u4e8e\u6700\u540e\u4e00\u884c\u9996<\/font><\/p>\n<p><strong><font style=\"color:rgb(36, 41, 46);\">\u7f16\u8f91<\/font><\/strong><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">i \u5728\u5f53\u524d\u4f4d\u7f6e\u751f\u524d\u63d2\u5165 I \u5728\u5f53\u524d\u884c\u9996\u63d2\u5165 a \u5728\u5f53\u524d\u4f4d\u7f6e\u540e\u63d2\u5165 A \u5728\u5f53\u524d\u884c\u5c3e\u63d2\u5165 o \u5728\u5f53\u524d\u884c\u4e4b\u540e\u63d2\u5165\u4e00\u884c O \u5728\u5f53\u524d\u884c\u4e4b\u524d\u63d2\u5165\u4e00\u884c \u7f16\u8f91\u7ed3\u675f\uff0c\u6309Esc\u8fd4\u56de\u547d\u4ee4\u6a21\u5f0f<\/font><\/p>\n<p><strong><font style=\"color:rgb(36, 41, 46);\">\u57fa\u672c\u67e5\u627e<\/font><\/strong><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\/text \u67e5\u627etext\uff0c\u6309n\u5065\u67e5\u627e\u4e0b\u4e00\u4e2a\uff0c\u6309N\u5065\u67e5\u627e\u524d\u4e00\u4e2a\u3002 ?text \u67e5\u627etext\uff0c\u53cd\u5411\u67e5\u627e\uff0c\u6309n\u5065\u67e5\u627e\u4e0b\u4e00\u4e2a\uff0c\u6309N\u5065\u67e5\u627e\u524d\u4e00\u4e2a\u3002 \u67e5\u627e\u5f88\u957f\u7684\u8bcd\uff0c\u5982\u679c\u4e00\u4e2a\u8bcd\u5f88\u957f\uff0c\u952e\u5165\u9ebb\u70e6\uff0c\u53ef\u4ee5\u5c06\u5149\u6807\u79fb\u52a8\u5230\u8be5\u8bcd\u4e0a\uff0c\u6309*\u6216#\u952e\u5373\u53ef\u4ee5\u8be5\u5355\u8bcd\u8fdb\u884c\u641c\u7d22\uff0c\u76f8\u5f53\u4e8e\/\u641c\u7d22\u3002\u800c#\u547d\u4ee4\u76f8\u5f53\u4e8e?\u641c\u7d22\u3002<\/font><\/p>\n<p><strong><font style=\"color:rgb(36, 41, 46);\">\u5220\u9664<\/font><\/strong><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u5220\u9664\u5f53\u524d\u884c dd \u5220\u96642\u884c 2dd<\/font><\/p>\n<p><strong><font style=\"color:rgb(36, 41, 46);\">\u62f7\u8d1d\u548c\u7c98\u8d34<\/font><\/strong><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">yy \u62f7\u8d1d\u5f53\u524d\u884c nyy \u62f7\u8d1d\u5f53\u524d\u540e\u5f00\u59cb\u7684n\u884c\uff0c\u6bd4\u59822yy\u62f7\u8d1d\u5f53\u524d\u884c\u53ca\u5176\u4e0b\u4e00\u884c\u3002 p \u5728\u5f53\u524d\u5149\u6807\u540e\u7c98\u8d34<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u533a\u5757\u62f7\u8d1d<\/font><\/p>\n<ol>\n<li><font style=\"color:rgb(36, 41, 46);\">\u5c06\u5149\u6807\u79fb\u52a8\u5230\u8981\u590d\u5236\u7684\u6587\u672c\u5f00\u59cb\u7684\u5730\u65b9\uff0c\u6309 v\u8fdb\u5165\u53ef\u89c6\u6a21\u5f0f\u3002<\/font><\/li>\n<li><font style=\"color:rgb(36, 41, 46);\">\u5c06\u5149\u6807\u79fb\u52a8\u5230\u8981\u590d\u5236\u7684\u6587\u672c\u7684\u7ed3\u675f\u7684\u5730\u65b9\uff0c\u6309y\u590d\u5236\u3002\u6b64\u65f6vim\u4f1a\u81ea\u52a8\u5c06\u5149\u6807\u5b9a\u4f4d\u5230\u9009\u4e2d\u6587\u672c\u7684\u5f00\u59cb\u7684\u5730\u65b9\uff0c\u5e76\u9000\u51fa\u53ef\u89c6\u6a21\u5f0f\u3002<\/font><\/li>\n<li><font style=\"color:rgb(36, 41, 46);\">\u6211\u79fb\u52a8\u5149\u6807\u5230\u6587\u672c\u7ed3\u675f\u7684\u5730\u65b9\uff0c\u6309 p\u7c98\u8d34\u3002<\/font><\/li>\n<\/ol>\n<p><strong><font style=\"color:rgb(36, 41, 46);\">\u9000\u51fa\u547d\u4ee4<\/font><\/strong><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">:wq \u4fdd\u5b58\u5e76\u9000\u51fa :q! \u5f3a\u5236\u9000\u51fa\u5e76\u5ffd\u7565\u6240\u6709\u66f4\u6539 :e! \u653e\u5f03\u6240\u6709\u4fee\u6539\uff0c\u5e76\u6253\u5f00\u539f\u6765\u6587\u4ef6 :w\u4fdd\u5b58\u4fee\u6539<\/font><\/p>\n<p><strong><font style=\"color:rgb(36, 41, 46);\">\u663e\u793a\u884c\u53f7<\/font><\/strong><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">set number<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">set nu<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u8f93\u5165:n\uff0c\u4ee3\u8868\u8df3\u8f6c\u5230\u7b2cn\u884c\uff0c\u5982:100\uff0c\u5c31\u8df3\u8f6c\u5230\u7b2c100\u884c\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u64a4\u9500\u64cd\u4f5c<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">u<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">vim\u4e0evi\u7684\u533a\u522b<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">vim\u662fvi\u7684\u5ef6\u7533 vim\u7f16\u8f91\u6e90\u7801\u4f1a\u9ad8\u4eae vim\u7684\u547d\u4ee4\u5bf9vi\u662f\u5b8c\u5168\u517c\u5bb9\u7684<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">5.\u6587\u4ef6\u641c\u7d22<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">find \/ -name file1 \u4ece \u2018\/\u2019 \u5f00\u59cb\u8fdb\u5165\u6839\u6587\u4ef6\u7cfb\u7edf\u641c\u7d22\u6587\u4ef6\u548c\u76ee\u5f55<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">find \/ -user user1 \u641c\u7d22\u5c5e\u4e8e\u7528\u6237 \u2018user1\u2019 \u7684\u6587\u4ef6\u548c\u76ee\u5f55 find \/home\/user1 -name *.bin \u5728\u76ee\u5f55 \u2018\/ home\/user1\u2019 \u4e2d\u641c\u7d22\u5e26\u6709\u2019.bin\u2019 \u7ed3\u5c3e\u7684\u6587\u4ef6 find \/usr\/bin -type f -atime +100 \u641c\u7d22\u5728\u8fc7\u53bb100\u5929\u5185\u672a\u88ab\u4f7f\u7528\u8fc7\u7684\u6267\u884c\u6587\u4ef6 find \/usr\/bin -type f -mtime -10 \u641c\u7d22\u572810\u5929\u5185\u88ab\u521b\u5efa\u6216\u8005\u4fee\u6539\u8fc7\u7684\u6587\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">find . -name \u2018<\/font><em><font style=\"color:rgb(36, 41, 46);\">.php\u2019 -mmin -30 \u67e5\u627e\u6700\u8fd130\u5206\u949f\u4fee\u6539\u7684\u5f53\u524d\u76ee\u5f55\u4e0b\u7684.php\u6587\u4ef6 find . -name &#8216;<\/font><\/em><font style=\"color:rgb(36, 41, 46);\">.php\u2019 -mtime 0 \u67e5\u627e\u6700\u8fd124\u5c0f\u65f6\u4fee\u6539\u7684\u5f53\u524d\u76ee\u5f55\u4e0b\u7684.php\u6587\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">find . -name \u2018*.inc\u2019 -mtime 0 -ls \u67e5\u627e\u6700\u8fd124\u5c0f\u65f6\u4fee\u6539\u7684\u5f53\u524d\u76ee\u5f55\u4e0b\u7684.php\u6587\u4ef6\uff0c\u5e76\u5217\u51fa\u8be6\u7ec6\u4fe1\u606f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">find . -type f -mtime 1<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u67e5\u627e\u5f53\u524d\u76ee\u5f55\u4e0b\uff0c\u6700\u8fd124-48\u5c0f\u65f6\u4fee\u6539\u8fc7\u7684\u5e38\u89c4\u6587\u4ef6\u3002 find . -type f -mtime +1 \u67e5\u627e\u5f53\u524d\u76ee\u5f55\u4e0b\uff0c\u6700\u8fd11\u5929\u524d\u4fee\u6539\u8fc7\u7684\u5e38\u89c4\u6587\u4ef6\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">-atime \u6587\u4ef6\u8bbf\u95ee\u65f6\u95f4<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">-ctime \u6587\u4ef6\u5e38\u89c1\u65f6\u95f4<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">-mtime\u6587\u4ef6\u4fee\u6539\u65f6\u95f4<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">-mtime n : n\u4e3a\u6570\u5b57\uff0c\u610f\u601d\u4e3a\u5728n\u5929\u4e4b\u524d\u7684\u201c\u4e00\u5929\u4e4b\u5185\u201d\u88ab\u66f4\u6539\u8fc7\u5185\u5bb9\u7684\u6587\u4ef6 -mtime +n : \u5217\u51fa\u5728n\u5929\u4e4b\u524d\uff08\u4e0d\u542bn\u5929\u672c\u8eab\uff09\u88ab\u66f4\u6539\u8fc7\u5185\u5bb9\u7684\u6587\u4ef6\u540d -mtime -n : \u5217\u51fa\u5728n\u5929\u4e4b\u5185\uff08\u542bn\u5929\u672c\u8eab\uff09\u88ab\u66f4\u6539\u8fc7\u5185\u5bb9\u7684\u6587\u4ef6\u540d<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">-type f \u4ee3\u8868\u4e00\u4e2a\u666e\u901a\u683c\u5f0f\u7684\u6587\u4ef6 \u4e8c\u8fdb\u5236\u6587\u4ef6<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">-type d \u4ee3\u8868\u6587\u4ef6\u5939<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">find \/ -name <em>.rpm -exec chmod 755 \u2018{}\u2019 ; \u641c\u7d22\u4ee5 \u2018.rpm\u2019 \u7ed3\u5c3e\u7684\u6587\u4ef6\u5e76\u5b9a\u4e49\u5176\u6743\u9650 find \/ -xdev -name <\/em>.rpm \u641c\u7d22\u4ee5 \u2018.rpm\u2019 \u7ed3\u5c3e\u7684\u6587\u4ef6\uff0c\u5ffd\u7565\u5149\u9a71\u3001\u6377\u76d8\u7b49\u53ef\u79fb\u52a8\u8bbe\u5907 locate *.ps \u5bfb\u627e\u4ee5 \u2018.ps\u2019 \u7ed3\u5c3e\u7684\u6587\u4ef6 &#8211; \u5148\u8fd0\u884c \u2018updatedb\u2019 \u547d\u4ee4 whereis halt \u663e\u793a\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6587\u4ef6\u3001\u6e90\u7801\u6216man\u7684\u4f4d\u7f6e which halt \u663e\u793a\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6587\u4ef6\u6216\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">grep kali \/etc\/passwd grep\u5173\u952e\u8bcd\u641c\u7d22<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">find \/ -name moonsec 2&gt;\/dev\/null \u641c\u7d22\u67d0\u4e2a\u6587\u4ef6\/\u6587\u4ef6\u5939 \u5c4f\u853d\u51fa\u9519\u4fe1\u606f<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">6.\u7528\u6237\u548c\u7fa4\u7ec4<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">groupadd group_name \u521b\u5efa\u4e00\u4e2a\u65b0\u7528\u6237\u7ec4 groupdel group_name \u5220\u9664\u4e00\u4e2a\u7528\u6237\u7ec4<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">cat \/etc\/group | grep group_name<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">usermod -a -G moontea k1\u628a\u7528\u6237k1\u9644\u52a0\u5176\u4ed6\u7528\u6237\u7ec4<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u521b\u5efa\u76ee\u5f55<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">useradd moonsec<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">passwd moonsec<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u521b\u5efa\u7528\u6237\u4ee5\u53ca\u5206\u914d\u76ee\u5f55<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">useradd -r -m -s \/bin\/bash moonsec<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u53c2\u6570\u7684\u610f\u601d\uff1a -r \u5efa\u7acb\u7cfb\u7edf\u8d26\u53f7 -m \u81ea\u52a8\u5efa\u7acb\u7528\u6237\u7684\u767b\u5165\u76ee\u5f55 -s \/bin\/bash \u6307\u5b9a\u7528\u6237\u767b\u5165\u540e\u6240\u4f7f\u7528\u7684shell<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u5207\u6362\u7528\u6237<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">su &#8211; root \u5207\u6362\u5230root\u7528\u6237<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">su \u7528\u6237\u540d \u5207\u6362\u5230\u666e\u901a\u7528\u6237<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">7.\u7cfb\u7edf\u7ba1\u7406<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">top<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u67e5\u770b\u6b63\u5728\u6307\u5411\u7684\u7a0b\u5e8f\u4fe1\u606f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u8fdb\u7a0b<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">ps -ef \u67e5\u770b\u6240\u6709\u8fdb\u7a0b\u4fe1\u606f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">ps -ef | grep tomcat \u67e5\u627e\u6307\u5b9a\u8fdb\u7a0b<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">kill -9 id \u5f3a\u5236\u6740\u6b7b\u8fdb\u7a0b<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">env \u5f53\u524d\u7684\u53d8\u91cf<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u67e5\u770b\u7cfb\u7edf\u53d8\u91cf<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">echo $PATH<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">hostname \u67e5\u770b\u4e3b\u673a\u540d<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">history \u67e5\u770b\u5386\u53f2\u547d\u4ee4<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">8.\u67e5\u770b\u78c1\u76d8\u4fe1\u606f<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">df \u9ed8\u8ba4\u4e0d\u5e26\u5355\u4f4d\uff0c\u6302\u8f7d\u70b9\u3001\u603b\u5bb9\u91cf\u3001\u5df2\u7528\u3001\u53ef\u7528<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">df -h \u53cb\u597d\u663e\u793a\uff08\u5e26\u5355\u4f4d\uff09\uff0c\u5f88\u591a\u547d\u4ee4\u7684\u53cb\u597d\u663e\u793a\u90fd\u662f-h<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">9.\u67e5\u770b\u5185\u5b58\u4fe1\u606f<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">free \u9ed8\u8ba4\u4ee5KB\u4e3a\u5355\u4f4d\uff0c\u603b\u5bb9\u91cf\u3001\u5df2\u7528\u3001\u53ef\u7528\u3001\u7f13\u5b58\u5927\u5c0f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">free -m \u9ed8\u8ba4\u4ee5MB\u4e3a\u5355\u4f4d<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">free -h \u4e0a\u97622\u79cd\u90fd\u4e0d\u5e26\u5355\u4f4d\u3001\u53ea\u663e\u793a\u6570\u503c\uff0c\u8fd9\u79cd\u662f\u53cb\u597d\u663e\u793a\u7684\uff0c\u4f1a\u5e26\u5355\u4f4dG\u3001M\u7b49<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">10.\u67e5\u770b\u73af\u5883\u53d8\u91cf<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">echo $JAVA_HOME echo $PATH | grep jdk<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">11\u5f00\u673a\u81ea\u542f<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">\u6709\u5f88\u591a\u7a0b\u5e8f\u5f80\u5f80\u90fd\u9700\u8981\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\uff0c\u6bd4\u5982tomcat\u3001mysql\u3001nginx\u7b49\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u5728\/etc\/rc.d\/rc.local\u6587\u4ef6\u4e2d\u52a0\u5165\u5f00\u673a\u8981\u81ea\u52a8\u6267\u884c\u7684\u7a0b\u5e8f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">vim \/etc\/rc.d\/rc.local<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u6302\u8f7d\u4e00\u4e2awindows\u7f51\u7edc\u5171\u4eab<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">mount -t smbfs -o username=user,password=pass \/\/WinClient\/share \/mnt\/share<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">12\u7f51\u5361\u914d\u7f6e<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">vi \/etc\/network\/interfaces<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">auto eth0 \/\/\u6307\u5b9a\u7f51\u5361\uff08\u6839\u636eifconfig\u7ed3\u679c\u4fee\u6539\uff09 iface eth0 inet static \/\/\u542f\u52a8\u9759\u6001ip address 192.168.0.66 \/\/ \u8bbe\u7f6e\u9759\u6001ip netmask 255.255.255.0 \/\/\u5b50\u7f51\u63a9\u7801 gateway 192.168.0.1 \/\/\u6307\u5b9a\u7f51\u5173<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u91cd\u542f\u7f51\u7edc<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">service networking restart \u6216\u8005\uff1a systemctl restart networking<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u8bbe\u7f6e\u4e34\u65f6ip<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">ifconfig eth0 192.168.0.33<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">13\u7f51\u5361DNS\u670d\u52a1\u5668<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">vi \/etc\/resovl.conf<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">nameserver 114.114.114.114<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u91cd\u542f\u7f51\u5361<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">service networking restart<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">systemctl restart networking<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u6ce8\u610f\u6709\u65f6\u5019\u91cd\u542f\u624d\u751f\u6548<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">14.\u670d\u52a1\u76f8\u5173<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">\u542f\u52a8apache2\u670d\u52a1\u5668<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\/etc\/init.d\/apache2 start<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u6253\u5f00\uff1a\/etc\/init.d\/apache2 start \u91cd\u542f\uff1a\/etc\/init.d\/apache2 restart \u5173\u95ed\uff1a\/etc\/init.d\/apache2 stop<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u542f\u52a8\u7f51\u5361<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\/etc\/init.d\/network start<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u7f51\u7edc\u76f8\u5173<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u5f00\u542f\u8def\u7531\u8f6c\u53d1<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">echo 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward<\/font><\/p>\n<h2><strong><font style=\"color:rgb(36, 41, 46);\">15.linux\u5e38\u7528\u7f51\u7edc\u547d\u4ee4<\/font><\/strong><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">\u7f51\u7edc\u548c\u76d1\u63a7\u547d\u4ee4\u7c7b\u4f3c\u4e8e\u8fd9\u4e9b\uff1a hostname, ping, ifconfig, iwconfig, netstat, nslookup, traceroute, finger, telnet, ethtool \u7528\u4e8e\u67e5\u770b linux \u670d\u52a1\u5668 ip \u5730\u5740\uff0c\u7ba1\u7406\u670d\u52a1\u5668\u7f51\u7edc\u914d\u7f6e\uff0c\u901a\u8fc7 telnet \u548c ethernet \u5efa\u7acb\u4e0e linux \u4e4b\u95f4\u7684\u7f51\u7edc\u94fe\u63a5\uff0c\u67e5\u770b linux \u7684\u670d\u52a1\u5668\u4fe1\u606f\u7b49\u3002\u4e0b\u9762\u8ba9\u6211\u4eec\u770b\u770b\u5728 Linux \u4e0b\u7684\u7f51\u7edc\u548c\u76d1\u63a7\u547d\u4ee4\u7684\u4f7f\u7528\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">hostname \u67e5\u770b\u672c\u673a\u540d<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">ping \u4e00\u822c\u7528\u4e8e\u6d4b\u8bd5\u7f51\u7edc\u662f\u5426\u901a \u5185\u7f51icmp<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">ping<\/font><font style=\"color:rgb(36, 41, 46);\"> <\/font><a href=\"http:\/\/www.baidu.com\/\"><font style=\"color:rgb(3, 102, 214);\">www.baidu.com<\/font><\/a><font style=\"color:rgb(36, 41, 46);\"> <\/font><font style=\"color:rgb(36, 41, 46);\">-c 3 \u6267\u884c3\u6b21<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">ifconfig \u7f51\u5361\u4fe1\u606f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">iwconfig \u7528\u4e8e\u914d\u7f6e\u6216\u83b7\u53d6\u65e0\u7ebf\u7f51\u7edc\u8bbe\u5907\u4fe1\u606f<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">netstat<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">-a (all)\u663e\u793a\u6240\u6709\u9009\u9879\uff0c\u9ed8\u8ba4\u4e0d\u663e\u793aLISTEN\u76f8\u5173 -t (tcp)\u4ec5\u663e\u793atcp\u76f8\u5173\u9009\u9879 -u (udp)\u4ec5\u663e\u793audp\u76f8\u5173\u9009\u9879 -n \u62d2\u7edd\u663e\u793a\u522b\u540d\uff0c\u80fd\u663e\u793a\u6570\u5b57\u7684\u5168\u90e8\u8f6c\u5316\u6210\u6570\u5b57\u3002 -l \u4ec5\u5217\u51fa\u6709\u5728 Listen (\u76d1\u542c) \u7684\u670d\u52d9\u72b6\u6001<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">-p \u663e\u793a\u5efa\u7acb\u76f8\u5173\u94fe\u63a5\u7684\u7a0b\u5e8f\u540d -r \u663e\u793a\u8def\u7531\u4fe1\u606f\uff0c\u8def\u7531\u8868 -e \u663e\u793a\u6269\u5c55\u4fe1\u606f\uff0c\u4f8b\u5982uid\u7b49 -s \u6309\u5404\u4e2a\u534f\u8bae\u8fdb\u884c\u7edf\u8ba1 -c \u6bcf\u9694\u4e00\u4e2a\u56fa\u5b9a\u65f6\u95f4\uff0c\u6267\u884c\u8be5netstat\u547d\u4ee4\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u63d0\u793a\uff1aLISTEN\u548cLISTENING\u7684\u72b6\u6001\u53ea\u6709\u7528-a\u6216\u8005-l\u624d\u80fd\u770b\u5230<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u5e38\u7528\u547d\u4ee4<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">netstat -ano<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">-an \u67e5\u770b\u5f53\u524d\u6240\u6709\u5df2\u8fde\u63a5\u7aef\u53e3 -nlpt \u67e5\u770b\u5f53\u524d\u6240\u6709tcp\u7aef\u53e3 -nlpu \u67e5\u770b\u5f53\u524d\u6240\u6709udp\u7aef\u53e3 -nlpt | grep 80 \u67e5\u770b\u6240\u670980\u7aef\u53e3\u4f7f\u7528\u60c5\u51b5<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">netstat -lntup \u67e5\u770b\u6240\u6709\u7684tcp\u548cupd\u7aef\u53e3<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">nslookup<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u67e5\u8be2\u5176\u4ed6\u8bb0\u5f55 \u76f4\u63a5\u67e5\u8be2\u8fd4\u56de\u7684\u662fA\u8bb0\u5f55\uff0c\u6211\u4eec\u53ef\u4ee5\u6307\u5b9a\u53c2\u6570\uff0c\u67e5\u8be2\u5176\u4ed6\u8bb0\u5f55\uff0c\u6bd4\u5982AAAA\u3001MX\u7b49\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">nslookup -qt=type domain [dns-server] \u5176\u4e2d\uff0ctype\u53ef\u4ee5\u662f\u4ee5\u4e0b\u8fd9\u4e9b\u7c7b\u578b\uff1a<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">A \u5730\u5740\u8bb0\u5f55 AAAA \u5730\u5740\u8bb0\u5f55 AFSDB Andrew\u6587\u4ef6\u7cfb\u7edf\u6570\u636e\u5e93\u670d\u52a1\u5668\u8bb0\u5f55 ATMA ATM\u5730\u5740\u8bb0\u5f55 CNAME \u522b\u540d\u8bb0\u5f55 HINFO \u786c\u4ef6\u914d\u7f6e\u8bb0\u5f55\uff0c\u5305\u62ecCPU\u3001\u64cd\u4f5c\u7cfb\u7edf\u4fe1\u606f ISDN \u57df\u540d\u5bf9\u5e94\u7684ISDN\u53f7\u7801 MB \u5b58\u653e\u6307\u5b9a\u90ae\u7bb1\u7684\u670d\u52a1\u5668 MG \u90ae\u4ef6\u7ec4\u8bb0\u5f55 MINFO \u90ae\u4ef6\u7ec4\u548c\u90ae\u7bb1\u7684\u4fe1\u606f\u8bb0\u5f55 MR \u6539\u540d\u7684\u90ae\u7bb1\u8bb0\u5f55 MX \u90ae\u4ef6\u670d\u52a1\u5668\u8bb0\u5f55 NS \u540d\u5b57\u670d\u52a1\u5668\u8bb0\u5f55 PTR \u53cd\u5411\u8bb0\u5f55 RP \u8d1f\u8d23\u4eba\u8bb0\u5f55 RT \u8def\u7531\u7a7f\u900f\u8bb0\u5f55 SRV TCP\u670d\u52a1\u5668\u4fe1\u606f\u8bb0\u5f55 TXT \u57df\u540d\u5bf9\u5e94\u7684\u6587\u672c\u4fe1\u606f X25 \u57df\u540d\u5bf9\u5e94\u7684X.25\u5730\u5740\u8bb0\u5f55<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">http\u534f\u8bae<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">curl<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">wget<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">traceroute<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">traceroute\u662f\u7528\u6765\u68c0\u6d4b\u53d1\u51fa\u6570\u636e\u5305\u7684\u4e3b\u673a\u5230\u76ee\u6807\u4e3b\u673a\u4e4b\u95f4\u6240\u7ecf\u8fc7\u7684\u7f51\u5173\u6570\u91cf\u7684\u5de5\u5177\u3002traceroute\u7684\u539f\u7406\u662f\u8bd5\u56fe\u4ee5\u6700\u5c0f\u7684TTL\uff08\u5b58\u6d3b\u65f6\u95f4\uff09\u53d1\u51fa\u63a2\u6d4b\u5305\u6765\u8ddf\u8e2a\u6570\u636e\u5305\u5230\u8fbe\u76ee\u6807\u4e3b\u673a\u6240\u7ecf\u8fc7\u7684\u7f51\u5173\uff0c\u7136\u540e\u76d1\u542c\u4e00\u4e2a\u6765\u81ea\u7f51\u5173ICMP\u7684\u5e94\u7b54\u3002\u53d1\u9001\u6570\u636e\u5305\u7684\u5927\u5c0f\u9ed8\u8ba4\u4e3a38\u4e2a\u5b57\u8282\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">-d \u4f7f\u7528Socket\u5c42\u7ea7\u7684\u6392\u9519\u529f\u80fd\u3002 -f \u8bbe\u7f6e\u7b2c\u4e00\u4e2a\u68c0\u6d4b\u6570\u636e\u5305\u7684\u5b58\u6d3b\u6570\u503cTTL\u7684\u5927\u5c0f\u3002 -F \u8bbe\u7f6e\u52ff\u79bb\u65ad\u4f4d\u3002 -g \u8bbe\u7f6e\u6765\u6e90\u8def\u7531\u7f51\u5173\uff0c\u6700\u591a\u53ef\u8bbe\u7f6e8\u4e2a\u3002 -i \u4f7f\u7528\u6307\u5b9a\u7684\u7f51\u7edc\u754c\u9762\u9001\u51fa\u6570\u636e\u5305\u3002 -I \u4f7f\u7528ICMP\u56de\u5e94\u53d6\u4ee3UDP\u8d44\u6599\u4fe1\u606f\u3002 -m \u8bbe\u7f6e\u68c0\u6d4b\u6570\u636e\u5305\u7684\u6700\u5927\u5b58\u6d3b\u6570\u503cTTL\u7684\u5927\u5c0f\u3002 -n \u76f4\u63a5\u4f7f\u7528IP\u5730\u5740\u800c\u975e\u4e3b\u673a\u540d\u79f0\u3002 -p \u8bbe\u7f6eUDP\u4f20\u8f93\u534f\u8bae\u7684\u901a\u4fe1\u7aef\u53e3\u3002 -r \u5ffd\u7565\u666e\u901a\u7684Routing Table\uff0c\u76f4\u63a5\u5c06\u6570\u636e\u5305\u9001\u5230\u8fdc\u7aef\u4e3b\u673a\u4e0a\u3002 -s \u8bbe\u7f6e\u672c\u5730\u4e3b\u673a\u9001\u51fa\u6570\u636e\u5305\u7684IP\u5730\u5740\u3002 -t \u8bbe\u7f6e\u68c0\u6d4b\u6570\u636e\u5305\u7684TOS\u6570\u503c\u3002 -v \u8be6\u7ec6\u663e\u793a\u6307\u4ee4\u7684\u6267\u884c\u8fc7\u7a0b\u3002 -w \u8bbe\u7f6e\u7b49\u5f85\u8fdc\u7aef\u4e3b\u673a\u56de\u62a5\u7684\u65f6\u95f4\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">-x \u5f00\u542f\u6216\u5173\u95ed\u6570\u636e\u5305\u7684\u6b63\u786e\u6027\u68c0\u9a8c\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">telnet<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">Linux telnet\u547d\u4ee4\u7528\u4e8e\u8fdc\u7aef\u767b\u5165\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u6267\u884ctelnet\u6307\u4ee4\u5f00\u542f\u7ec8\u7aef\u673a\u9636\u6bb5\u4f5c\u4e1a\uff0c\u5e76\u767b\u5165\u8fdc\u7aef\u4e3b\u673a\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u73b0\u5728\u591a\u6570\u7528\u4e8e\u68c0\u6d4b\u67d0\u4e2a\u7aef\u53e3\u662f\u5426\u5f00\u653e<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">Finger<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">Finger\u662f\u4e00\u79cd\u7528\u6237\u4fe1\u606f\u5206\u4eab\u670d\u52a1\u3002\u5b83\u5de5\u4f5c\u5728TCP 79\u7aef\u53e3\uff0c\u53ef\u4ee5\u7528\u6765\u516c\u5f00\u7528\u6237\u7684\u7279\u5b9a\u4fe1\u606f\u3002Nmap\u7684finger\u7684\u811a\u672c\u53ef\u4ee5\u5411Finger\u670d\u52a1\u5668\u53d1\u9001\u8bf7\u6c42\uff0c\u67e5\u8be2\u5e76\u83b7\u53d6\u7528\u6237\u7684\u76f8\u5173\u4fe1\u606f\uff0c\u5982\u767b\u5f55\u540d\u3001\u7528\u6237\u540d\u3001TTY\u7c7b\u578b\u3001\u767b\u5f55\u65f6\u95f4\u7b49\u3002<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">ethtool \u662f\u7528\u4e8e\u67e5\u8be2\u53ca\u8bbe\u7f6e\u7f51\u5361\u53c2\u6570\u7684\u547d\u4ee4<\/font><\/p>\n<h2><font style=\"color:rgb(36, 41, 46);\">16.\u9632\u706b\u5899iptables<\/font><\/h2>\n<p><font style=\"color:rgb(36, 41, 46);\">\u67e5\u770b\u9632\u706b\u5899\u89c4\u5219<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">iptalbes -L<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u6e05\u9664\u89c4\u5219<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">iptables -F<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u5173\u95ed\u9632\u706b\u5899<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\/etc\/init.d\/iptables stop<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">service iptables stop<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u5b89\u88c5\uff1aapt-get install ufw<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u5173\u95ed\uff1aufw disable # To disable the firewall<\/font><\/p>\n<p><font style=\"color:rgb(36, 41, 46);\">\u5f00\u542f\uff1aufw enable # To enable the firewall<\/font><\/p>\n<blockquote>\n<p>\u66f4\u65b0: 2025-04-25 19:18:45<br \/>\n\u539f\u6587: <a href=\"https:\/\/www.yuque.com\/yuhui.net\/network\/hh5rogqqgrcaxxrb\">https:\/\/www.yuque.com\/yuhui.net\/network\/hh5rogqqgrcaxxrb<\/a><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Kali&amp;Linux\u57fa\u672c\u547d\u4ee4 kali kali\u7684\u5e38\u7528\u547d\u4ee4 1.\u5e38\u7528\u547d\u4ee4 passwd \u4fee\u6539\u5bc6\u7801 passwd root \u4fee\u6539root\u7528\u6237\u5bc6\u7801 date \u663e\u793a\u7cfb\u7edf\u65e5\u671f sudo \u540e\u9762\u52a0\u547d\u4ee4 \u5c31\u53ef\u4ee5\u8c03\u7528\u7ba1\u7406\u6743\u9650 apt-get update \u66f4\u65b0\u8f6f\u4ef6\u5217\u8868 \u8fd9\u4e2a\u547d\u4ee4\uff0c\u4f1a\u8bbf\u95ee\u6e90\u5217\u8868\u91cc\u7684\u6bcf\u4e2a\u7f51\u5740\uff0c\u5e76\u8bfb\u53d6\u8f6f\u4ef6\u5217\u8868\uff0c\u7136\u540e\u4fdd\u5b58\u5728\u672c\u5730\u7535\u8111\u3002\u6211\u4eec\u5728\u65b0\u7acb\u5f97\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\u91cc\u770b\u5230\u7684\u8f6f\u4ef6\u5217\u8868\uff0c\u90fd\u662f\u901a\u8fc7update\u547d\u4ee4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124,119,2],"tags":[12,22,28,29,32],"class_list":["post-802","post","type-post","status-publish","format-standard","hentry","category-qianzhizhishi","category-shentouceshijichu-network_sec","category-network_sec","tag-12","tag-windows","tag-kali","tag-java","tag-install"],"_links":{"self":[{"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/posts\/802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/comments?post=802"}],"version-history":[{"count":0,"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/posts\/802\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/media?parent=802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/categories?post=802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/tags?post=802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}