×ðÁú¿­Ê±

ÔõÑù¼ìË÷LinuxϵͳÖеÄËùÓÐÓû§

LinuxϵͳÏÂÔõÑùÉó²éËùÓÐÓû§

ÔÚLinuxϵͳÖÐ £¬ÒªÉó²éËùÓÐÓû§¿ÉÒÔͨ¹ýÏÂÁîÐÐÀ´ÊµÏÖ¡£ÏÂÃ潫ÏÈÈݼ¸ÖÖ³£ÓõÄÒªÁìÀ´Éó²éϵͳÖеÄËùÓÐÓû§ £¬°üÀ¨Í¨Ë×Óû§ºÍϵͳÓû§¡£

ʹÓÃcat /etc/passwdÏÂÁî

ÔÚLinuxϵͳÖÐ £¬ËùÓÐÓû§ÐÅÏ¢¶¼ÉúÑÄÔÚ/etc/passwdÎļþÖС£ÎÒÃÇ¿ÉÒÔʹÓÃcatÏÂÁîÀ´Éó²éÕâ¸öÎļþ £¬´Ó¶ø»ñÈ¡ËùÓÐÓû§µÄÐÅÏ¢¡£

cat /etc/passwd

µÇ¼ºó¸´ÖÆ

ÉÏÊöÏÂÁî»áÏÔʾһ¸ö°üÀ¨ËùÓÐÓû§ÐÅÏ¢µÄÁбí £¬Ã¿Ðдú±íÒ»¸öÓû§ £¬¿ÉÒÔ¿´µ½Óû§µÄÓû§Ãû¡¢UID£¨Óû§ID£©¡¢GID£¨×éID£©¡¢Óû§ÐÎò¡¢Ö÷Ŀ¼¡¢µÇ¼shellµÈÐÅÏ¢¡£Í¨¹ýÕâÖÖ·½·¨¿ÉÒÔÉó²éËùÓÐÓû§µÄ»ù±¾ÐÅÏ¢¡£

ʹÓÃgetent passwdÏÂÁî

getentÏÂÁî¿ÉÒÔÓÃÀ´»ñȡϵͳÓû§ºÍ×éµÄÐÅÏ¢ £¬Ò²¿ÉÒÔͨ¹ýgetent passwdÀ´Éó²éËùÓÐÓû§µÄÐÅÏ¢¡£

getent passwd

µÇ¼ºó¸´ÖÆ

Õâ¸öÏÂÁîÊä³öµÄÐÅÏ¢Óëcat /etc/passwdÏÂÁîÀàËÆ £¬Ò²ÊÇÁгöÁËϵͳÖеÄËùÓÐÓû§ÐÅÏ¢¡£

ʹÓÃcutºÍawkÏÂÁî

ÈôÊÇÎÒÃÇֻϣÍûÉó²éÓû§Ãû £¬¿ÉÒÔʹÓÃcutºÍawkÀ´ÌáÈ¡/etc/passwdÎļþÖеÄÓû§ÃûÐÅÏ¢¡£

cat /etc/passwd | cut -d: -f 1

µÇ¼ºó¸´ÖÆ

ÉÏÃæµÄÏÂÁî»áÁгöϵͳÖÐËùÓÐÓû§µÄÓû§Ãû¡£

ʹÓÃawkÏÂÁî

ÁíÍâÒ»ÖÖÒªÁìÊÇÖ±½ÓʹÓÃawkÏÂÁîÀ´´Ó/etc/passwdÎļþÖÐÌáÈ¡Óû§Ãû¡£

awk -F: '{print $1}' /etc/passwd

µÇ¼ºó¸´ÖÆ

Õâ¸öÏÂÁîÒ²¿ÉÒÔÖ±½ÓÊä³öϵͳÖÐËùÓÐÓû§µÄÓû§Ãû¡£

×ÛÉÏËùÊö £¬ÒÔÉÏÊÇÔÚLinuxϵͳÏÂÉó²éËùÓÐÓû§µÄ¼¸ÖÖ³£ÓÃÒªÁì £¬Ã¿ÖÖÒªÁ춼Óвî±ðµÄÓÃ;ºÍʵÏÖ·½·¨ £¬¿ÉÒÔƾ֤ÏêϸµÄÐèÇóÑ¡ÔñºÏÊʵÄÒªÁìÀ´Éó²éϵͳÖеÄÓû§ÐÅÏ¢¡£

ÒÔÉϾÍÊÇÔõÑù¼ìË÷LinuxϵͳÖеÄËùÓÐÓû§µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±ÊµÊ±ÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±

13452372176

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
¡¾ÍøÕ¾µØͼ¡¿¡¾sitemap¡¿