From 0922f42ff30abff485d86ce4cf2557d8ef7b00d6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 30 Dec 2013 02:50:36 +0000 Subject: [PATCH] =?UTF-8?q?[Translated]=20Linux=20id=20Command=20=A8C=20Pr?= =?UTF-8?q?int=20user=20ID=20and=20group=20ID=20information?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Print user ID and group ID information.md | 109 ------------------ ... Print user ID and group ID information.md | 105 +++++++++++++++++ 2 files changed, 105 insertions(+), 109 deletions(-) delete mode 100644 sources/Linux id Command 每 Print user ID and group ID information.md create mode 100644 translated/Linux id Command 每 Print user ID and group ID information.md diff --git a/sources/Linux id Command 每 Print user ID and group ID information.md b/sources/Linux id Command 每 Print user ID and group ID information.md deleted file mode 100644 index ae1bb77dfb..0000000000 --- a/sources/Linux id Command 每 Print user ID and group ID information.md +++ /dev/null @@ -1,109 +0,0 @@ -Translating---------------------geekpi - - - -Linux id Command Print user ID and group ID information -================================================================================ -To log in into a computer, we need a username. Username is an identity to recognized by a computer. Based on it, computer will apply a set of rules to a someone that log in with that username. On Linux system we can use **id** command. - -### What is id command ### - -**id** command is command which can print real and effective User ID (UID) and Group ID (GID). An UID is a single identity for a user. While Group ID (GID) can consist more than one UID. - -### How to use it ### - -By default, **id** command is installed on most of Linux system. To use it, just type id on your console. Typing id without no options will result as below. The result will use the active user. - - $ id - -![Default id output](http://linoxide.com/wp-content/uploads/2013/12/id_default.png) - -#### Heres how to read the output : #### - -- User **pungki** has **UID** number = **1000**, **GID** number = **1000** -- User **pungki is a member** of the following groups : - - **pungki** with GID = **1000** - **adm** with GID = **4** - **cdrom** with GID = **24** - **sudo** with GID = **27** - **dip** with GID = **30** - **plugdev** with GID = **46** - **lpadmin** with GID = **108** - **sambashare** with GID = **124** - -### Using id with options ### - -There are some options that can applied to id command. Heres some options that may useful on day-to-day basis. - -#### Print user name, UID an all the group to which the user belongs #### - -To do this, we can use **-a** option - - $ id -a - -![-a option](http://linoxide.com/wp-content/uploads/2013/12/id_a.png) - -#### Output all different group IDs (effective, real and supplementary) #### - -We can use **-G** option to do fulfill this. - - $ id -G - -![-G option](http://linoxide.com/wp-content/uploads/2013/12/id_G.png) - -The result will only show the GID numbers. You can compare it with **/etc/group** file. Heres a sample of **/etc/grou**p content : - - root:x:0: - daemon:x:1: - bin:x:2: - sys:x:3: - adm:x:4:pungki - fax:x:21: - voice:x:22: - cdrom:x:24:pungki - floppy:x:25: - tape:x:26: - sudo:x:27:pungki - audio:x:29:pulse - dip:x:30:pungki - www-data:x:33: - backup:x:34: - operator:x:37: - sasl:x:45: - plugdev:x:46:pungki - ssl-cert:x:107: - lpadmin:x:108:pungki - saned:x:123: - sambashare:x:124:pungki - winbindd_priv:x:125: - -#### Output only the effective group ID #### - -Use **-g** option to output only the effective group ID - - $ id -g - -![-g option](http://linoxide.com/wp-content/uploads/2013/12/id_g1.png) - -#### Print the specific user information #### - -We can output a specific user information related UID and GID. Just put the user name after id command. - - $ id leni - -![leni user](http://linoxide.com/wp-content/uploads/2013/12/id_leni.png) - -Above command will print UID and GID of user named **leni**. - -### Conclusion ### - -This id command is useful for us when we want to know about UID and GID of a user. Some applications may need UID / GID to be run. id make us easier to find UID and GID of a user without seeing and searching it inside /etc/group file. As usual you can go to id manual page by typing **man id** from your console to explore more detail. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-command/linux-id-command/ - -霂嚗[霂ID](https://github.com/霂ID) ∪笆嚗[∪笆ID](https://github.com/∪笆ID) - -祆 [LCTT](https://github.com/LCTT/TranslateProject) 蝧餉嚗[Linux銝剖稽(http://linux.cn/) 隤典 \ No newline at end of file diff --git a/translated/Linux id Command 每 Print user ID and group ID information.md b/translated/Linux id Command 每 Print user ID and group ID information.md new file mode 100644 index 0000000000..4d25938008 --- /dev/null +++ b/translated/Linux id Command 每 Print user ID and group ID information.md @@ -0,0 +1,105 @@ +Linux id 賭誘 - 啁冽搏d蝏id靽⊥ +================================================================================ +閬餃乩啗恣蝞綽隞祇閬銝銝芰冽瑕冽瑕臭銝芾◤霈∠箄怎頨思遢箔甇歹霈∠箔撖嫣蝙刻銝芰冽瑕駁鈭箏其蝟餃閫汪inux蝟餌銝嚗隞砍臭誑雿輻**id**賭誘 + +### 隞銋疳d賭誘 ### + +**id** 賭誘臭誑啁摰撟嗆冽弒D(UID)蝏ID(GID)UID臬笆銝銝芰冽瑞臭霂蝏ID嚗GID嚗臭誑怠銝枓ID + +### 憒雿雿輻 ### + +暺霈支嚗**id**賭誘撌脩憸鋆典之憭袂inux蝟餌銝准閬雿輻典嚗芷閬其批嗅啗可d銝撣阡憿寡可d隡曄內憒銝蝏隡雿輻冽暑頝冽瑯 + + $ id + +![id暺霈方榜(http://linoxide.com/wp-content/uploads/2013/12/id_default.png) + +#### 憒雿霂餃颲演 : #### + +- 冽 **pungki** **UID** 瑞 = **1000**, **GID** 瑞 = **1000** +- 冽 **pungki ** 臭Y蝏 : + + **pungki** with GID = **1000** + **adm** with GID = **4** + **cdrom** with GID = **24** + **sudo** with GID = **27** + **dip** with GID = **30** + **plugdev** with GID = **46** + **lpadmin** with GID = **108** + **sambashare** with GID = **124** + +### 撣阡憿嫣蝙甬d ### + +id賭誘臭誑雿輻其鈭憿嫘銝X銝鈭冽亙虜雿輻其葉函憿嫘 + +#### 啁冽瑕, 霂冊ID撅蝏 #### + +閬餈銋嚗隞砍臭誑雿輻**-a** 憿 + + $ id -a + +![-a 憿鉛(http://linoxide.com/wp-content/uploads/2013/12/id_a.png) + +#### 颲箸銝蝏ID (嚗摰銵亙) #### + +隞砍臭誑雿輻 **-G**憿孵啗銝芥 + + $ id -G + +![-G 憿鉛(http://linoxide.com/wp-content/uploads/2013/12/id_G.png) + +蝏芯曄內GID瑯雿臭誑**/etc/group**隞嗆颲銝X**/etc/group**隞嗥蝷箔摰對 + + root:x:0: + daemon:x:1: + bin:x:2: + sys:x:3: + adm:x:4:pungki + fax:x:21: + voice:x:22: + cdrom:x:24:pungki + floppy:x:25: + tape:x:26: + sudo:x:27:pungki + audio:x:29:pulse + dip:x:30:pungki + www-data:x:33: + backup:x:34: + operator:x:37: + sasl:x:45: + plugdev:x:46:pungki + ssl-cert:x:107: + lpadmin:x:108:pungki + saned:x:123: + sambashare:x:124:pungki + winbindd_priv:x:125: + +#### 芾箸蝏ID #### + +雿輻 **-g** 憿寞亙芾箸蝏ID + + $ id -g + +![-g 憿鉛(http://linoxide.com/wp-content/uploads/2013/12/id_g1.png) + +#### 啁孵冽瑚縑 #### + +隞砍臭誑颲箇孵冽瑚縑舐詨喟UIDGID芷閬甬d賭誘頝銝冽瑕 + + $ id leni + +![leni 冽愍(http://linoxide.com/wp-content/uploads/2013/12/id_leni.png) + +銝Y賭誘隡啁冽**leni**UIDGID + +### 餌 ### + +敶隞祆喟仿銝芰冽瑞UIDGID嗆舫撣豢函銝鈭蝔摨航賡閬UID/GID亥銵id雿踵隞祆游摰寞唳曉箇冽瑞UID隞乎ID銝敹/etc/group隞嗡葉撖颯敺撣訾瘀雿臭誑冽批嗅啗**man id**餈可d憿菜亥瑕游蝏 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/linux-id-command/ + +霂嚗[geekpi](https://github.com/geekpi) ∪笆嚗[∪笆ID](https://github.com/∪笆ID) + +祆 [LCTT](https://github.com/LCTT/TranslateProject) 蝧餉嚗[Linux銝剖稽(http://linux.cn/) 隤典 \ No newline at end of file