\u53cd\u5f15\u53f7\uff08` `\uff09<\/strong>\uff1a\u628a\u5176\u4e2d\u7684\u547d\u4ee4\u6267\u884c\u540e\u8fd4\u56de\u7ed3\u679c\u3002<\/p><\/blockquote>\n\u6211\u4eec\u5148\u5b9a\u4e49\u4e00\u4e2a\u540d\u4e3aPRICE\u7684\u53d8\u91cf\u5e76\u8d4b\u503c\u4e3a5\uff0c\u7136\u540e\u8f93\u51fa\u4ee5\u53cc\u5f15\u53f7\u62ec\u8d77\u6765\u7684\u5b57\u7b26\u4e32\u4e0e\u53d8\u91cf\u4fe1\u606f\uff1a<\/p>\n
[root@linuxprobe ~]# PRICE=5\r\n[root@linuxprobe ~]# echo \"Price is $PRICE\"\r\nPrice is\u00a05\r\n<\/pre>\n\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5e0c\u671b\u80fd\u591f\u8f93\u51fa\u201cPrice is $5\u201d\uff0c\u5373\u201c\u4ef7\u683c\u662f5\u7f8e\u5143\u201d\u7684\u5b57\u7b26\u4e32\u5185\u5bb9\uff0c\u4f46\u78b0\u5de7\u7f8e\u5143\u7b26\u53f7\u4e0e\u53d8\u91cf\u63d0\u53d6\u7b26\u53f7\u5408\u5e76\u540e\u7684$$\u4f5c\u7528\u662f\u663e\u793a\u5f53\u524d\u7a0b\u5e8f\u7684\u8fdb\u7a0bID\u53f7\u7801\uff0c\u4e8e\u662f\u547d\u4ee4\u6267\u884c\u540e\u8f93\u51fa\u7684\u5185\u5bb9\u5e76\u4e0d\u662f\u6211\u4eec\u6240\u9884\u671f\u7684\uff1a<\/p>\n<\/div>\n
[root@linuxprobe ~]# echo \"Price is $$PRICE\" \r\nPrice is 3767PRICE<\/pre>\n\u8981\u60f3\u8ba9\u7b2c\u4e00\u4e2a\u201c$\u201d\u4e56\u4e56\u5730\u4f5c\u4e3a\u7f8e\u5143\u7b26\u53f7\uff0c\u90a3\u4e48\u5c31\u9700\u8981\u4f7f\u7528\u53cd\u659c\u6760\uff08\\\uff09\u6765\u8fdb\u884c\u8f6c\u4e49\uff0c\u5c06\u8fd9\u4e2a\u547d\u4ee4\u63d0\u53d6\u7b26\u8f6c\u4e49\u6210\u5355\u7eaf\u7684\u6587\u672c\uff0c\u53bb\u9664\u5176\u7279\u6b8a\u529f\u80fd\uff1a<\/p>\n
\n
[root@linuxprobe ~]# echo \"Price is \\$$PRICE\"\r\nPrice is $5\r\n<\/pre>\n\u800c\u5982\u679c\u53ea\u9700\u8981\u67d0\u4e2a\u547d\u4ee4\u7684\u8f93\u51fa\u503c\uff0c\u53ef\u4ee5\u50cf`\u547d\u4ee4`\u8fd9\u6837\uff0c\u5c06\u547d\u4ee4\u7528\u53cd\u5f15\u53f7\u62ec\u8d77\u6765\uff0c\u8fbe\u5230\u9884\u671f\u7684\u6548\u679c\u3002\u4f8b\u5982\uff0c\u5c06\u53cd\u5f15\u53f7\u4e0euname -a\u547d\u4ee4\u7ed3\u5408\uff0c\u7136\u540e\u4f7f\u7528echo\u547d\u4ee4\u6765\u67e5\u770b\u672c\u673a\u7684Linux\u7248\u672c\u548c\u5185\u6838\u4fe1\u606f\uff1a<\/p>\n
[root@linuxprobe ~]# echo `uname -a`\r\nLinux q13zd.cn 4.18.0-80.el8.x86_64 #1 SMP Wed Mar 13 12:02:46 UTC 2019 x86_64 x86_64 x86_64 GNU\/Linux<\/pre>\n<\/div>\n\n
\n
\u53cd\u659c\u6760\u548c\u53cd\u5f15\u53f7\u7684\u529f\u80fd\u6bd4\u8f83\u6709\u7279\u70b9\uff0c\u540c\u5b66\u4eec\u4e00\u822c\u4e0d\u4f1a\u72af\u9519\uff0c\u4f46\u5bf9\u4e8e\u4ec0\u4e48\u65f6\u5019\u4f7f\u7528\u53cc\u5f15\u53f7\u5374\u5bb9\u6613\u6df7\u6dc6\uff0c\u56e0\u4e3a\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u597d\u50cf\u52a0\u4e0d\u52a0\u53cc\u5f15\u53f7\uff0c\u6548\u679c\u90fd\u4e00\u6837\uff1a<\/p>\n
[root@linuxprobe ~]# echo AA BB CC\r\nAA BB CC\r\n[root@linuxprobe ~]# echo \"AA BB CC\"\r\nAA BB CC<\/pre>\n\u4e24\u8005\u7684\u533a\u522b\u5728\u4e8e\u7528\u6237\u65e0\u6cd5\u5f97\u77e5\u7b2c\u4e00\u79cd\u6267\u884c\u65b9\u5f0f\u4e2d\u5230\u5e95\u6709\u51e0\u4e2a\u53c2\u6570\u3002\u662f\u7684\uff0c\u4e0d\u80fd\u786e\u5b9a\uff01\u56e0\u4e3a\u6709\u53ef\u80fd\u628a\u201cAA BB CC\u201d\u5f53\u4f5c\u4e00\u4e2a\u53c2\u6570\u6574\u4f53\u76f4\u63a5\u8f93\u51fa\u5230\u5c4f\u5e55\uff0c\u4e5f\u6709\u53ef\u80fd\u5206\u522b\u5c06AA\u3001BB\u548cCC\u8f93\u51fa\u5230\u5c4f\u5e55\u3002\u800c\u4e14\uff0c\u5c31\u7b97\u6478\u6e05\u4e86echo\u547d\u4ee4\u5904\u7406\u53c2\u6570\u7684\u673a\u5236\uff0c\u5728\u4f7f\u7528\u5176\u4ed6\u547d\u4ee4\u65f6\u4f9d\u7136\u5b58\u5728\u8fd9\u79cd\u60c5\u51b5\u3002<\/p>\n
\u8fd9\u91cc\u7ed9\u5927\u5bb6\u603b\u7ed3\u4e00\u4e2a\u7b80\u5355\u5c0f\u6280\u5de7\uff0c\u867d\u7136\u53ef\u80fd\u4e0d\u591f\u4e25\u8c28\uff0c\u4f46\u7edd\u5bf9\u7b80\u5355\uff1a\u5982\u679c\u53c2\u6570\u4e2d\u51fa\u73b0\u4e86\u7a7a\u683c\uff0c\u5c31\u52a0\u53cc\u5f15\u53f7\uff1b\u5982\u679c\u53c2\u6570\u4e2d\u6ca1\u6709\u7a7a\u683c\uff0c\u90a3\u5c31\u4e0d\u7528\u52a0\u53cc\u5f15\u53f7\u3002<\/p>\n<\/div>\n
3.5\u00a0\u91cd\u8981\u7684\u73af\u5883\u53d8\u91cf<\/strong><\/span><\/h5>\n\u53d8\u91cf\u662f\u8ba1\u7b97\u673a\u7cfb\u7edf\u7528\u4e8e\u4fdd\u5b58\u53ef\u53d8\u503c\u7684\u6570\u636e\u7c7b\u578b\u3002\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u53d8\u91cf\u540d\u79f0\u4e00\u822c\u90fd\u662f\u5927\u5199\u7684\uff0c\u547d\u4ee4\u5219\u90fd\u662f\u5c0f\u5199\u7684\uff0c\u8fd9\u662f\u4e00\u79cd\u7ea6\u5b9a\u4fd7\u6210\u7684\u89c4\u8303\u3002Linux\u7cfb\u7edf\u4e2d\u7684\u73af\u5883\u53d8\u91cf\u662f\u7528\u6765\u5b9a\u4e49\u7cfb\u7edf\u8fd0\u884c\u73af\u5883\u7684\u4e00\u4e9b\u53c2\u6570\uff0c\u6bd4\u5982\u6bcf\u4e2a\u7528\u6237\u4e0d\u540c\u7684\u5bb6\u76ee\u5f55\u3001\u90ae\u4ef6\u5b58\u653e\u4f4d\u7f6e\u7b49\u3002\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u53d8\u91cf\u540d\u79f0\u6765\u63d0\u53d6\u5230\u5bf9\u5e94\u7684\u53d8\u91cf\u503c\u3002<\/p>\n
\u7ec6\u5fc3\u7684\u8bfb\u8005\u5e94\u8be5\u53d1\u73b0\u4e86\uff0c\u672c\u8282\u548c\u4e0a\u4e00\u8282\u7684\u6807\u9898\u540d\u90fd\u5206\u522b\u52a0\u4e86\u5f62\u5bb9\u8bcd\u2014\u91cd\u8981\u7684\u3001\u5e38\u7528\u7684\uff0c\u539f\u56e0\u5176\u5b9e\u4e0d\u8a00\u800c\u55bb\u2014\u8981\u60f3\u8ba9Linux\u7cfb\u7edf\u80fd\u591f\u6b63\u5e38\u8fd0\u884c\u5e76\u4e14\u4e3a\u7528\u6237\u63d0\u4f9b\u670d\u52a1\uff0c\u5219\u9700\u8981\u6570\u767e\u4e2a\u73af\u5883\u53d8\u91cf\u6765\u534f\u540c\u5de5\u4f5c\uff0c\u6211\u4eec\u6ca1\u6709\u5fc5\u8981\u9010\u4e00\u4ecb\u7ecd\u3001\u5b66\u4e60\u6bcf\u4e00\u4e2a\u53d8\u91cf\uff0c\u800c\u662f\u5e94\u8be5\u5728\u6709\u9650\u7684\u7bc7\u5e45\u4e2d\u7cbe\u8bb2\u6700\u91cd\u8981\u7684\u5185\u5bb9\u3002<\/p>\n
\u4e3a\u4e86\u66f4\u597d\u5730\u5e2e\u52a9\u5927\u5bb6\u7406\u89e3\u53d8\u91cf\u7684\u4f5c\u7528\uff0c\u7ed9\u5927\u5bb6\u4e3e\u4e2a\u4f8b\u5b50\u3002\u524d\u6587\u4e2d\u66fe\u7ecf\u8bb2\u5230\uff0c\u5728Linux\u7cfb\u7edf\u4e2d\u4e00\u5207\u90fd\u662f\u6587\u4ef6\uff0cLinux\u547d\u4ee4\u4e5f\u4e0d\u4f8b\u5916\u3002\u90a3\u4e48\uff0c\u5728\u7528\u6237\u6267\u884c\u4e86\u4e00\u6761\u547d\u4ee4\u4e4b\u540e\uff0cLinux\u7cfb\u7edf\u4e2d\u5230\u5e95\u53d1\u751f\u4e86\u4ec0\u4e48\u4e8b\u60c5\u5462\uff1f\u7b80\u5355\u6765\u8bf4\uff0c\u547d\u4ee4\u5728Linux\u4e2d\u7684\u6267\u884c\u5206\u4e3a4\u4e2a\u6b65\u9aa4\u3002<\/p>\n
\u7b2c1\u6b65<\/strong>\uff1a\u5224\u65ad\u7528\u6237\u662f\u5426\u4ee5\u7edd\u5bf9\u8def\u5f84\u6216\u76f8\u5bf9\u8def\u5f84\u7684\u65b9\u5f0f\u8f93\u5165\u547d\u4ee4\uff08\u5982\/bin\/ls\uff09\uff0c\u5982\u679c\u662f\u7edd\u5bf9\u8def\u5f84\u5219\u76f4\u63a5\u6267\u884c\uff0c\u5426\u5219\u8fdb\u5165\u7b2c2\u6b65\u7ee7\u7eed\u5224\u65ad\u3002<\/p>\n\u7b2c2\u6b65<\/strong>\uff1aLinux\u7cfb\u7edf\u68c0\u67e5\u7528\u6237\u8f93\u5165\u7684\u547d\u4ee4\u662f\u5426\u4e3a\u201c\u522b\u540d\u547d\u4ee4\u201d\uff0c\u5373\u7528\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684\u547d\u4ee4\u540d\u79f0\u6765\u66ff\u6362\u539f\u672c\u7684\u547d\u4ee4\u540d\u79f0\u3002<\/p>\n\u4e4b\u524d\u5728\u4f7f\u7528rm\u547d\u4ee4\u5220\u9664\u6587\u4ef6\u65f6\uff0cLinux\u7cfb\u7edf\u90fd\u4f1a\u8981\u6c42\u7528\u6237\u786e\u8ba4\u662f\u5426\u6267\u884c\u5220\u9664\u64cd\u4f5c\uff0c\u5176\u5b9e\u8fd9\u5c31\u662fLinux\u7cfb\u7edf\u4e3a\u4e86\u9632\u6b62\u7528\u6237\u8bef\u5220\u9664\u6587\u4ef6\u800c\u7279\u610f\u8bbe\u7f6e\u7684rm\u522b\u540d\u547d\u4ee4\u2014\u201crm -i\u201d\u3002<\/p>\n
[root@linuxprobe ~]# ls\r\nanaconda-ks.cfg Documents initial-setup-ks.cfg Pictures Templates\r\nDesktop Downloads Music Public Videos\r\n[root@linuxprobe ~]# rm anaconda-ks.cfg \r\nrm: remove regular file 'anaconda-ks.cfg'? y\r\n<\/pre>\n\u53ef\u4ee5\u7528alias\u547d\u4ee4\u6765\u521b\u5efa\u4e00\u4e2a\u5c5e\u4e8e\u81ea\u5df1\u7684\u547d\u4ee4\u522b\u540d\uff0c\u8bed\u6cd5\u683c\u5f0f\u4e3a\u201calias\u522b\u540d=\u547d\u4ee4\u201d\u3002\u82e5\u8981\u53d6\u6d88\u4e00\u4e2a\u547d\u4ee4\u522b\u540d\uff0c\u5219\u662f\u7528unalias\u547d\u4ee4\uff0c\u8bed\u6cd5\u683c\u5f0f\u4e3a\u201cunalias\u522b\u540d\u201d\u3002<\/p>\n
\u5c06\u5f53\u524drm\u547d\u4ee4\u6240\u88ab\u8bbe\u7f6e\u7684\u522b\u540d\u53d6\u6d88\u6389\uff0c\u518d\u5220\u9664\u6587\u4ef6\u8bd5\u8bd5\uff1a<\/p>\n<\/div>\n
\n
\n
[root@linuxprobe ~]# unalias rm\r\n[root@linuxprobe ~]# rm initial-setup-ks.cfg \r\n[root@linuxprobe ~]#<\/pre>\n<\/div>\n\u7b2c3\u6b65<\/strong>\uff1aBash\u89e3\u91ca\u5668\u5224\u65ad\u7528\u6237\u8f93\u5165\u7684\u662f\u5185\u90e8\u547d\u4ee4\u8fd8\u662f\u5916\u90e8\u547d\u4ee4\u3002\u5185\u90e8\u547d\u4ee4\u662f\u89e3\u91ca\u5668\u5185\u90e8\u7684\u6307\u4ee4\uff0c\u4f1a\u88ab\u76f4\u63a5\u6267\u884c\uff1b\u800c\u7528\u6237\u5728\u7edd\u5927\u90e8\u5206\u65f6\u95f4\u8f93\u5165\u7684\u662f\u5916\u90e8\u547d\u4ee4\uff0c\u8fd9\u4e9b\u547d\u4ee4\u4ea4\u7531\u6b65\u9aa44\u7ee7\u7eed\u5904\u7406\u3002\u53ef\u4ee5\u4f7f\u7528\u201ctype\u547d\u4ee4\u540d\u79f0\u201d\u6765\u5224\u65ad\u7528\u6237\u8f93\u5165\u7684\u547d\u4ee4\u662f\u5185\u90e8\u547d\u4ee4\u8fd8\u662f\u5916\u90e8\u547d\u4ee4\uff1a<\/p>\n[root@linuxprobe ~]# type echo\r\necho is a shell builtin\r\n[root@linuxprobe ~]# type uptime\r\nuptime is \/usr\/bin\/uptime<\/pre>\n\u7b2c4\u6b65<\/strong>\uff1a\u7cfb\u7edf\u5728\u591a\u4e2a\u8def\u5f84\u4e2d\u67e5\u627e\u7528\u6237\u8f93\u5165\u7684\u547d\u4ee4\u6587\u4ef6\uff0c\u800c\u5b9a\u4e49\u8fd9\u4e9b\u8def\u5f84\u7684\u53d8\u91cf\u53eb\u4f5cPATH\uff0c\u53ef\u4ee5\u7b80\u5355\u5730\u628a\u5b83\u7406\u89e3\u6210\u662f\u201c\u89e3\u91ca\u5668\u7684\u5c0f\u52a9\u624b\u201d\uff0c\u4f5c\u7528\u662f\u544a\u8bc9Bash\u89e3\u91ca\u5668\u5f85\u6267\u884c\u7684\u547d\u4ee4\u53ef\u80fd\u5b58\u653e\u7684\u4f4d\u7f6e\uff0c\u7136\u540eBash\u89e3\u91ca\u5668\u5c31\u4f1a\u4e56\u4e56\u5730\u5728\u8fd9\u4e9b\u4f4d\u7f6e\u4e2d\u9010\u4e2a\u67e5\u627e\u3002PATH\u662f\u7531\u591a\u4e2a\u8def\u5f84\u503c\u7ec4\u6210\u7684\u53d8\u91cf\uff0c\u6bcf\u4e2a\u8def\u5f84\u503c\u4e4b\u95f4\u7528\u5192\u53f7\u95f4\u9694\uff0c\u5bf9\u8fd9\u4e9b\u8def\u5f84\u7684\u589e\u52a0\u548c\u5220\u9664\u64cd\u4f5c\u5c06\u5f71\u54cd\u5230Bash\u89e3\u91ca\u5668\u5bf9Linux\u547d\u4ee4\u7684\u67e5\u627e\u3002<\/p>\n[root@linuxprobe ~]# echo $PATH\r\n\/usr\/local\/bin:\/usr\/local\/sbin:\/usr\/bin:\/usr\/sbin:\/root\/bin\r\n[root@linuxprobe ~]# PATH=$PATH:\/root\/bin\r\n<\/strong>[root@linuxprobe ~]# echo $PATH\r\n\/usr\/local\/bin:\/usr\/local\/sbin:\/usr\/bin:\/usr\/sbin:\/root\/bin:\/root\/bin\r\n<\/strong><\/pre>\n\u8fd9\u91cc\u6709\u6bd4\u8f83\u7ecf\u5178\u7684\u95ee\u9898\uff1a\u201c\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u5c06\u5f53\u524d\u76ee\u5f55\uff08.\uff09\u6dfb\u52a0\u5230PATH\u4e2d\u5462?\u201d\u539f\u56e0\u662f\uff0c\u5c3d\u7ba1\u53ef\u4ee5\u5c06\u5f53\u524d\u76ee\u5f55\uff08.\uff09\u6dfb\u52a0\u5230PATH\u53d8\u91cf\u4e2d\uff0c\u4ece\u800c\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u53ef\u4ee5\u8ba9\u7528\u6237\u514d\u53bb\u8f93\u5165\u547d\u4ee4\u6240\u5728\u8def\u5f84\u7684\u9ebb\u70e6\u3002\u4f46\u662f\uff0c\u5982\u679c\u9ed1\u5ba2\u5728\u6bd4\u8f83\u5e38\u7528\u7684\u516c\u5171\u76ee\u5f55\/tmp\u4e2d\u5b58\u653e\u4e86\u4e00\u4e2a\u4e0els\u6216cd\u547d\u4ee4\u540c\u540d\u7684\u6728\u9a6c\u6587\u4ef6\uff0c\u800c\u7528\u6237\u53c8\u6070\u5de7\u5728\u516c\u5171\u76ee\u5f55\u4e2d\u6267\u884c\u4e86\u8fd9\u4e9b\u547d\u4ee4\uff0c\u90a3\u4e48\u5c31\u6781\u6709\u53ef\u80fd\u4e2d\u62db\u4e86\u3002<\/p>\n
\u6240\u4ee5\uff0c\u4f5c\u4e3a\u4e00\u540d\u6001\u5ea6\u8c28\u614e\u3001\u6709\u7ecf\u9a8c\u7684\u8fd0\u7ef4\u4eba\u5458\uff0c\u5728\u63a5\u624b\u4e00\u53f0Linux\u7cfb\u7edf\u540e\u4e00\u5b9a\u4f1a\u5728\u6267\u884c\u547d\u4ee4\u524d\u5148\u68c0\u67e5PATH\u53d8\u91cf\u4e2d\u662f\u5426\u6709\u53ef\u7591\u7684\u76ee\u5f55\u3002\u53e6\u5916\uff0c\u8bfb\u8005\u4ece\u524d\u9762\u7684PATH\u53d8\u91cf\u793a\u4f8b\u4e2d\u662f\u5426\u4e5f\u611f\u89c9\u5230\u73af\u5883\u53d8\u91cf\u7279\u522b\u6709\u7528\u5462\uff1f\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528env\u547d\u4ee4\u6765\u67e5\u770bLinux\u7cfb\u7edf\u4e2d\u6240\u6709\u7684\u73af\u5883\u53d8\u91cf\uff0c\u800c\u5218\u9044\u8001\u5e08\u4e3a\u60a8\u7cbe\u6311\u7ec6\u9009\u51fa\u4e86\u6700\u91cd\u8981\u768410\u4e2a\u73af\u5883\u53d8\u91cf\uff0c\u5982\u88683-4\u6240\u793a\u3002<\/p>\n
\u88683-4\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Linux\u7cfb\u7edf\u4e2d\u6700\u91cd\u8981\u768410\u4e2a\u73af\u5883\u53d8\u91cf<\/p>\n
\n\n\n\u53d8\u91cf\u540d\u79f0<\/td>\n | \u4f5c\u7528<\/td>\n<\/tr>\n |
\nHOME<\/td>\n | \u7528\u6237\u7684\u4e3b\u76ee\u5f55\uff08\u5373\u5bb6\u76ee\u5f55\uff09<\/td>\n<\/tr>\n |
\nSHELL<\/td>\n | \u7528\u6237\u5728\u4f7f\u7528\u7684Shell\u89e3\u91ca\u5668\u540d\u79f0<\/td>\n<\/tr>\n |
\nHISTSIZE<\/td>\n | \u8f93\u51fa\u7684\u5386\u53f2\u547d\u4ee4\u8bb0\u5f55\u6761\u6570<\/td>\n<\/tr>\n |
\nHISTFILESIZE<\/td>\n | \u4fdd\u5b58\u7684\u5386\u53f2\u547d\u4ee4\u8bb0\u5f55\u6761\u6570<\/td>\n<\/tr>\n |
\nMAIL<\/td>\n | \u90ae\u4ef6\u4fdd\u5b58\u8def\u5f84<\/td>\n<\/tr>\n |
\nLANG<\/td>\n | \u7cfb\u7edf\u8bed\u8a00\u3001\u8bed\u7cfb\u540d\u79f0<\/td>\n<\/tr>\n |
\nRANDOM<\/td>\n | \u751f\u6210\u4e00\u4e2a\u968f\u673a\u6570\u5b57<\/td>\n<\/tr>\n |
\nPS1<\/td>\n | Bash\u89e3\u91ca\u5668\u7684\u63d0\u793a\u7b26<\/td>\n<\/tr>\n |
\nPATH<\/td>\n | \u5b9a\u4e49\u89e3\u91ca\u5668\u641c\u7d22\u7528\u6237\u6267\u884c\u547d\u4ee4\u7684\u8def\u5f84<\/td>\n<\/tr>\n |
\nEDITOR<\/td>\n | \u7528\u6237\u9ed8\u8ba4\u7684\u6587\u672c\u7f16\u8f91\u5668<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n Linux\u4f5c\u4e3a\u4e00\u4e2a\u591a\u7528\u6237\u3001\u591a\u4efb\u52a1\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u80fd\u591f\u4e3a\u6bcf\u4e2a\u7528\u6237\u63d0\u4f9b\u72ec\u7acb\u7684\u3001\u5408\u9002\u7684\u5de5\u4f5c\u8fd0\u884c\u73af\u5883\u3002\u56e0\u6b64\uff0c\u4e00\u4e2a\u76f8\u540c\u7684\u53d8\u91cf\u4f1a\u56e0\u4e3a\u7528\u6237\u8eab\u4efd\u7684\u4e0d\u540c\u800c\u5177\u6709\u4e0d\u540c\u7684\u503c\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u4e0b\u8ff0\u547d\u4ee4\u6765\u67e5\u770bHOME\u53d8\u91cf\u5728\u4e0d\u540c\u7684\u7528\u6237\u8eab\u4efd\u4e0b\u90fd\u6709\u54ea\u4e9b\u503c\uff08su\u662f\u7528\u4e8e\u5207\u6362\u7528\u6237\u8eab\u4efd\u7684\u547d\u4ee4\uff0c\u5c06\u5728\u7b2c5\u7ae0\u8ddf\u5927\u5bb6\u89c1\u9762\uff09\uff1a<\/p>\n [root@linuxprobe ~]# echo $HOME\r\n\/root\r\n[root@linuxprobe ~]# su - linuxprobe\r\n[linuxprobe@linuxprobe ~]$ echo $HOME\r\n\/home\/linuxprobe\r\n<\/pre>\n\u5176\u5b9e\u53d8\u91cf\u662f\u7531\u56fa\u5b9a\u7684\u53d8\u91cf\u540d\u4e0e\u7528\u6237\u6216\u7cfb\u7edf\u8bbe\u7f6e\u7684\u53d8\u91cf\u503c\u4e24\u90e8\u5206\u7ec4\u6210\u7684\uff0c\u6211\u4eec\u5b8c\u5168\u53ef\u4ee5\u81ea\u884c\u521b\u5efa\u53d8\u91cf\u6765\u6ee1\u8db3\u5de5\u4f5c\u9700\u6c42\u3002\u4f8b\u5982\uff0c\u8bbe\u7f6e\u4e00\u4e2a\u540d\u79f0\u4e3aWORKDIR\u7684\u53d8\u91cf\uff0c\u65b9\u4fbf\u7528\u6237\u66f4\u8f7b\u677e\u5730\u8fdb\u5165\u4e00\u4e2a\u5c42\u6b21\u8f83\u6df1\u7684\u76ee\u5f55\uff1a<\/p>\n [root@linuxprobe ~]# mkdir \/home\/workdir\r\n[root@linuxprobe ~]# WORKDIR=\/home\/workdir\r\n[root@linuxprobe ~]# cd $WORKDIR \r\n[root@linuxprobe workdir]# pwd\r\n\/home\/workdir\r\n<\/pre>\n\u4f46\u662f\uff0c\u8fd9\u6837\u7684\u53d8\u91cf\u4e0d\u5177\u6709\u5168\u5c40\u6027\uff0c\u4f5c\u7528\u8303\u56f4\u4e5f\u6709\u9650\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4e0d\u80fd\u88ab\u5176\u4ed6\u7528\u6237\u4f7f\u7528\uff1a<\/p>\n [root@linuxprobe workdir]# su linuxprobe\r\n[linuxprobe@linuxprobe ~]$ cd $WORKDIR\r\n[linuxprobe@linuxprobe ~]$ echo $WORKDIR\r\n[linuxprobe@linuxprobe ~]$ exit\r\n<\/pre>\n\u5982\u679c\u5de5\u4f5c\u9700\u8981\uff0c\u53ef\u4ee5\u4f7f\u7528export\u547d\u4ee4\u5c06\u5176\u63d0\u5347\u4e3a\u5168\u5c40\u53d8\u91cf\uff0c\u8fd9\u6837\u5176\u4ed6\u7528\u6237\u4e5f\u5c31\u53ef\u4ee5\u4f7f\u7528\u5b83\u4e86\uff1a<\/p>\n [root@linuxprobe ~]# export\u00a0WORKDIR\r\n<\/strong>[root@linuxprobe ~]# su linuxprobe\r\n[linuxprobe@linuxprobe ~]$ cd $WORKDIR\r\n[linuxprobe@linuxprobe workdir]$ pwd\r\n\/home\/workdir\r\n<\/pre>\n\u540e\u7eed\u8981\u662f\u4e0d\u4f7f\u7528\u8fd9\u4e2a\u53d8\u91cf\u4e86\uff0c\u5219\u53ef\u6267\u884cunset\u547d\u4ee4\u628a\u5b83\u53d6\u6d88\u6389\uff1a<\/p>\n [root@linuxprobe ~]# unset WORKDIR\r\n[root@linuxprobe ~]#<\/pre>\n |