×ðÁú¿­Ê±¹ÙÍøµÇ¼

ÔõÑù¼ìË÷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ϵͳÖеÄËùÓÐÓû§µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

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

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

QR code
ÍøÕ¾µØͼ