{"id":281881,"date":"2023-09-03T20:04:21","date_gmt":"2023-09-03T12:04:21","guid":{"rendered":"https:\/\/lrxjmw.cn\/lyhhzglyhmtj.html"},"modified":"2023-09-03T20:04:21","modified_gmt":"2023-09-03T12:04:21","slug":"lyhhzglyhmtj","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lyhhzglyhmtj.html","title":{"rendered":"Linux\u7528\u6237\u548c\u7ec4\u7ba1\u7406\u7528\u6237\u540d–\u6dfb\u52a0\u9644\u5c5e\u7ec4\u6210\u5458\u6743\u9650\u7ba1\u7406"},"content":{"rendered":"

Linux<\/a>\u7528\u6237\u548c\u7ec4\u7ba1\u7406<\/p>\n

useradd\u7528\u6237\u540d--\u521b\u5efa\u7528\u6237<\/p>\n

useradd-u\u53c2\u6570\u7528\u6237\u540d--\u6307\u5b9a\u7528\u6237uid<\/p>\n

useradd-g\u53c2\u6570\u7528\u6237\u540d--\u6307\u5b9a\u7528\u6237gid<\/p>\n

id\u7528\u6237\u540d--\u67e5\u770b\u7528\u6237<\/p>\n

cat\/etc\/passwd--\u53ef\u901a\u8fc7\u67e5\u770b\u7528\u6237\u914d\u7f6e\u6587\u4ef6\u67e5\u770b\u7528\u6237<\/p>\n

usermod[\u53c2\u6570]\u7528\u6237\u540d--\u66f4\u6539\u7528\u6237<\/p>\n

usermod-u\u53c2\u6570\u7528\u6237\u540d--\u66f4\u6539\u7528\u6237uid<\/p>\n

usermod-g\u53c2\u6570\u7528\u6237\u540d--\u66f4\u6539\u7528\u6237gid<\/p>\n

userdel\u7528\u6237\u540d--\u5220\u6389\u7528\u6237<\/p>\n

userdel-r\u7528\u6237\u540d--\u5220\u6389\u7528\u6237\u53ca\u7ea7\u8054\u6587\u4ef6<\/p>\n

linux\u67e5\u770b\u6587\u4ef6\u6743\u9650_\u67e5\u770b\u6587\u4ef6\u6743\u9650\u7684linux\u547d\u4ee4_linux\u4e2d\u67e5\u770b\u6587\u4ef6\u6743\u9650<\/p>\n

su-\u7528\u6237\u540d--\u5207\u6362\u7528\u6237<\/p>\n

passwd\u7528\u6237\u540d--\u8bbe\u7f6e\u7528\u6237\u5bc6\u7801\uff08\u5fc5\u987b\u4f7f\u7528root\u5e10\u6237\u8bbe\u7f6e\uff09<\/p>\n

groupadd\u7ec4\u540d--\u521b\u5efa\u7ec4groupadd-g\u53c2\u6570\u7ec4\u540d\u6307\u5b9a\u7ec4gid<\/p>\n

groupdel\u7ec4\u540d--\u5220\u6389\u7ec4--\u9700\u5148\u5220\u6389\u7ec4\u4e0b\u7684\u7528\u6237<\/p>\n

gpasswd-a\u7528\u6237\u540d\u7ec4\u540d--\u6dfb\u52a0\u9644\u5c5e\u7ec4\u6210\u5458<\/p>\n

Linux\u6743\u9650\u7ba1\u7406<\/p>\n

--\u4e3b\u8981\u8bf4\u660eugo\u6743\u9650<\/p>\n

ll--\u67e5\u770bugo\u6743\u9650\u6216\u5219ls-l\u547d\u4ee4<\/a>\u67e5\u770b<\/p>\n

--\u524d10\u4f4d\u53ef\u5206\u62c6\u4e3a\uff1a1\uff0c3\uff0c3\uff0c3\u56db\u4e2a\u6bb5\uff0c\u5206\u522b\u4ee3\u8868\u6587\u4ef6\u7c7b\u578b\uff0cuser\u7528\u6237\u6743\u9650linux\u67e5\u770b\u6587\u4ef6\u6743\u9650<\/strong>\uff0cgroup\u7ec4\u6743\u9650linux\u67e5\u770b\u6587\u4ef6\u6743\u9650<\/strong>\uff0cother\u5176\u4ed6\u6743\u9650\uff0c\u65c1\u8fb9\u7684\u503c\u4f9d\u6b21\u4ee3\u8868\u786c\u94fe\u63a5\u6570\uff0c\u5c5e\u4e3b\uff0c\u5c5e\u7ec4\uff0c\u6587\u4ef6\u5927\u5c0f\uff0c\u6700\u540e\u66f4\u6539\u65f6\u95f4linux\u5c31\u8be5\u8fd9\u4e48\u5b66\uff0c\u6587\u4ef6\u540d\u79f0\u3002<\/p>\n

--\u4ee5\u7b2c\u4e00\u884c\uff1adr-xr-xr-x\u4e3a\u4f8b\uff1a\u5206\u62c6\u4e3ad\uff0cr-x\uff0cr-x\uff0cr-x\u56db\u6bb5\u3002<\/p>\n

\u7b2c\u4e00\u6bb5\u4ee3\u8868\u6587\u4ef6\u7c7b\u578b\uff0cd=\u76ee\u5f55\uff0c-=\u666e\u901a\u6587\u4ef6\uff0cp=pipe\uff0cs=socket\uff0cl=link\uff0cc=charredhat linux\u4e0b\u8f7d\uff0cb=block\u7b49\u3002<\/p>\n

\u7b2c\u4e8c\u6bb5\u4ee3\u8868\u7528\u6237\u6743\u9650\uff0c\u6743\u9650\u5206\u4e3ar=read\uff0cw=write\uff0cx=exe\uff0c-=\u65e0\u5bf9\u5e94\u6743\u9650\u56db\u79cd\uff0cr-x\u4ee3\u8868\u5c5e\u4e3b\u5bf9\u8be5\u6587\u4ef6\u5939\u6709\u8bfb\u548c\u6267\u884c\u6743\u9650\uff0c\u65e0\u5199\u6743\u9650\u3002<\/p>\n

\u7b2c\u4e09\u6bb5\u4ee3\u8868\u7ec4\u6743\u9650\uff0cr-x\u4ee3\u8868\u5c5e\u7ec4\u5bf9\u8be5\u6587\u4ef6\u5939\u6709\u8bfb\u548c\u6267\u884c\u6743\u9650\uff0c\u65e0\u5199\u6743\u9650\u3002<\/p>\n

\u7b2c\u56db\u6bb5\u4ee3\u8868\u5176\u4ed6\u6743\u9650\uff0cr-x\u4ee3\u8868\u9664\u5c5e\u4e3b\uff0c\u5c5e\u7ec4\u4ee5\u5916\u7684\u5176\u4ed6\u7528\u6237\u548c\u7ec4\u5bf9\u8be5\u6587\u4ef6\u5939\u6709\u8bfb\u548c\u6267\u884c\u6743\u9650\uff0c\u65e0\u5199\u6743\u9650\u3002<\/p>\n

rwx\u5c31\u4ee3\u8868\u6709\u6240\u6709\u6743\u9650\u3002<\/p>\n

chmod--\u66f4\u6539\u6743\u9650\uff0c\u5206\u522b\u7528+\uff0c-\uff0c=\u4e09\u79cd\u8fd0\u7b97\u4ee3\u8868\u65b0\u589e\uff0c\u53d6\u6d88\uff0c\u8bbe\u7f6e\u56fa\u5b9a\u6743\u9650\u3002--\u4ee5\u7b2c\u4e00\u884c\uff1adr-xr-xr-x\u4e3a\u4f8b\uff0c\u8981\u4e3auser\u6dfb\u52a0\u5199\u6743\u9650\u53ef\u4ee5chmodu+w\/\u76ee\u5f55\uff0c\u4e3a\u6240\u6709\u90fd\u6dfb\u52a0\u5199\u6743\u9650\u53ef\u4ee5chmodu+w\uff0cg+w\uff0co+w\/\u76ee\u5f55\uff1b\u4e5f\u53ef\u7528a\u8868\u793a\u6240\u6709chmoda+w\/\u76ee\u5f55\u3002\u53d6\u6d88\u6743\u9650\u548c\u8bbe\u7f6e\u56fa\u5b9a\u6743\u9650\u64cd\u4f5c\u65b9\u6cd5\u96f7\u540c\u3002<\/p>\n

\u4e5f\u53ef\u4ee5\u7528\u516b\u8865\u7801\u6765\u8bbe\u7f6eugo\u6743\u9650\uff0c-=0\uff0cr=1\uff0cw=2\uff0cx=4\uff0c--\u4ee5\u7b2c\u4e00\u884c\uff1adr-xr-xr-x\u4e3a\u4f8b\uff0c\u6743\u9650\u4e3a555\u6743\u9650\uff0c\u8981\u4e3auser\u6dfb\u52a0\u5199\u6743\u9650\u53ef\u4ee5chmod755\/\u76ee\u5f55\uff0c\u4e3a\u6240\u6709\u90fd\u6dfb\u52a0\u5199\u6743\u9650\u53ef\u4ee5chmod777\/\u76ee\u5f55\u3002<\/p>\n

chmod000\/\u76ee\u5f55--\u5bf9\u76ee\u5f55\u53d6\u6d88\u5168\u90e8\u6743\u9650<\/p>\n

chmod777\/\u76ee\u5f55--\u5bf9\u76ee\u5f55\u5168\u90e8\u6388\u6743<\/p>\n

chmod-R777\/\u76ee\u5f55--\u5bf9\u76ee\u5f55\u53ca\u7ea7\u8054\u5168\u90e8\u6388\u6743<\/p>\n

Linux\u8f6f\u4ef6\u5305\u5b89\u88c5<\/p>\n

mount\/dev\/cdrom\/mnt\/\u6302\u8f7d\u70b9\/--\u6302\u8f7d\u5149\u789f--\u987b\u8981\u5148\u5728mnt\u76ee\u5f55\u4e0b\u521b\u5efa\u6302\u8f7d\u70b9\u76ee\u5f55<\/p>\n

umount\/dev\/sr0--\u5378\u8f7d\u5149\u789f<\/p>\n

rpm-ivh\u8f6f\u4ef6\u5305\u540d\u79f0--\u8f6f\u4ef6\u5305\u5b89\u88c5<\/p>\n

rpm-ql\u8f6f\u4ef6\u540d\u79f0--\u67e5\u770b\u8f6f\u4ef6\u5b89\u88c5\u6587\u4ef6<\/p>\n

rpm-qf\u547d\u4ee4\u6587\u4ef6\u7edd\u5bf9\u8def\u5f84--\u67e5\u770b\u5bf9\u5e94\u547d\u4ee4\u7684\u8f6f\u4ef6<\/p>\n

which\u547d\u4ee4--\u67e5\u770b\u547d\u4ee4\u7684\u7edd\u5bf9\u8def\u5f84<\/p>\n

rpm-e\u8f6f\u4ef6\u540d\u79f0--\u5220\u6389\u5b89\u88c5\u8f6f\u4ef6<\/p>\n

yum<\/a>\u6e90<\/p>\n

cd\/etc\/yum.repos.d--yum\u6e90\u914d\u7f6e\u6587\u4ef6\u4f4d\u7f6e<\/p>\n

vim****.repo--\u521b\u5efa\u914d\u7f6e\u6587\u4ef6--\u540d\u79f0\u53ef\u4ee5\u4efb\u610f\uff0c\u540e\u7f00\u540d\u5fc5\u987b\u4e3a.repo<\/p>\n

\u5f55\u5165\u5185\u5bb9{<\/p>\n

linux\u67e5\u770b\u6587\u4ef6\u6743\u9650_\u67e5\u770b\u6587\u4ef6\u6743\u9650\u7684linux\u547d\u4ee4_linux\u4e2d\u67e5\u770b\u6587\u4ef6\u6743\u9650<\/p>\n

[repo_id]<\/p>\n

name=repo_name<\/p>\n

enabled=1<\/p>\n

gpgcheck=0<\/p>\n

baseurl=file:\/\/\u5149\u789f\u6302\u8f7d\u7684\u7edd\u5bf9\u8def\u5f84<\/p>\n

\uff1awq}<\/p>\n

yumrepolist--\u67e5\u770byum\u6e90\u5305<\/p>\n

yuminstall\u8f6f\u4ef6\u540d\u79f0--yum\u8f6f\u4ef6\u5305\u5b89\u88c5<\/p>\n

yumremove\u8f6f\u4ef6\u540d\u79f0--yum\u8f6f\u4ef6\u5305\u5378\u8f7d<\/p>\n

yumlist--\u5217\u4e3eyum\u6e90\u4e2d\u7684\u6240\u6709\u5b89\u88c5\u5305<\/p>\n

yumlist>**.txt--\u8f93\u51fayum\u6e90\u4e2d\u7684\u6240\u6709\u7684\u5b89\u88c5\u5305\u540d\u79f0\u5230**.txt\u6587\u4ef6\u4e2d<\/p>\n

\u67e5\u770b\u6587\u4ef6\u6743\u9650\u7684linux\u547d\u4ee4_linux\u4e2d\u67e5\u770b\u6587\u4ef6\u6743\u9650_linux\u67e5\u770b\u6587\u4ef6\u6743\u9650<\/p>\n

yumsearch\u5173\u952e\u5b57--\u641c\u7d22yum\u6e90\u4e2d\u5305\u542b\u5173\u952e\u5b57\u7684\u5b89\u88c5\u5305<\/p>\n

Linux\u7f51\u8def\u7ba1\u7406<\/p>\n

hostname--\u67e5\u770b\u4e3b\u673a\u540d<\/p>\n

hostname\u65b0\u4e3b\u673a\u540d--\u4e34\u65f6\u8bbe\u7f6e\u4e3b\u673a\u540d<\/p>\n

vim\/etc\/sysconfig\/network--\u6c38\u4e45\u8bbe\u7f6e\u4e3b\u673a\u540d\uff08\u987b\u8981\u91cd\u542f\u751f\u6548\uff09<\/p>\n

ifconfig--\u67e5\u770b\u7f51\u8def\u6216\u5219ipaddr\u67e5\u770b<\/p>\n

ifconfigeth0\u65b0ip--\u96f6\u65f6\u8bbe\u7f6eIP<\/p>\n

setup--\u53ef\u56fe\u5f62\u5316\u754c\u9762\u8bbe\u7f6e\u6c38\u4e45IP<\/p>\n

servicenetworkrestart--\u91cd\u542f\u7f51\u8def\u670d\u52a1<\/p>\n

ifdowneth0--\u4e34\u65f6\u5173\u6389\u7f51\u5361<\/p>\n

ifupeth0--\u4e34\u65f6\u542f\u7528\u7f51\u5361<\/p>\n

vim\/etc\/sysconfig\/network-scripts\/ifcfg-eth0\u914d\u7f6e\u7f51\u5361\u6587\u4ef6<\/p>\n","protected":false},"excerpt":{"rendered":"

–\u53ef\u901a\u8fc7\u67e5\u770b\u7528\u6237\u914d\u7f6e\u6587\u4ef6\u67e5\u770b\u7528\u6237\u6743\u9650\u7ba1\u7406\u547d\u4ee4\u67e5\u770b\uff0c-=\u65e0\u5bf9\u5e94\u6743\u9650\u56db\u79cd\uff0cr-x\u4ee3\u8868\u5c5e\u4e3b\u5bf9\u8be5\u6587\u4ef6\u5939\u6709\u8bfb\u548c\u6267\u884c\u6743\u9650\uff0c\u65e0\u5199\u6743\u9650\u3002\u7b2c\u4e09\u6bb5\u4ee3\u8868\u7ec4\u6743\u9650\uff0cr-x\u4ee3\u8868\u5c5e\u7ec4\u5bf9\u8be5\u6587\u4ef6\u5939\u6709\u8bfb\u548c\u6267\u884c\u6743\u9650\uff0c\u65e0\u5199\u6743\u9650\u3002\u4e09\u79cd\u8fd0\u7b97\u4ee3\u8868\u65b0\u589e\uff0c\u53d6\u6d88\uff0c\u8bbe\u7f6e\u56fa\u5b9a\u6743\u9650\u3002\u53d6\u6d88\u6743\u9650\u548c\u8bbe\u7f6e\u56fa\u5b9a\u6743\u9650\u64cd\u4f5c\u65b9\u5f0f\u96f7\u540c\u3002–\u5bf9\u76ee\u5f55\u53d6\u6d88\u5168\u90e8\u6743\u9650–\u67e5\u770b\u8f6f\u4ef6\u5b89\u88c5\u6587\u4ef6–\u67e5\u770b\u5bf9\u5e94\u547d\u4ee4\u7684\u8f6f\u4ef6–\u67e5\u770b\u547d\u4ee4\u7684\u7edd\u5bf9\u8def\u5f84–yum\u6e90\u914d\u7f6e\u6587\u4ef6\u4f4d\u7f6e<\/p>\n","protected":false},"author":1,"featured_media":281882,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-281881","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/281881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=281881"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/281881\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/281882"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=281881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=281881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=281881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}