Newgrp

来自WordPress中文文档
跳转至: 导航搜索

Linux命令:newgrp

功能说明:登入另一个群组。
语  法:newgrp [群组名称]

补充说明:newgrp指令类似login指令,当它是以相同的帐号,另一个群组名称,再次登入系统。欲使用newgrp指令切换群组,您必须是该群组的用户,否则将无法登入指定的群组。单一用户要同时隶属多个群组,需利用交替用户的设置。若不指定群组名称,则newgrp指令会登入该用户名称的预设群组。


英文版本,欢迎翻译:

ABOUT NEWGRP

Log into a new group.

SYNTAX

newgrp [ -| -l ] [ group ] [argument]

- | -l Change the environment to what would be expected if the user actually logged in again as a member of the new group. group A group name from the group database or a non negative numeric group ID. Specifies the group ID to which the real and effective group IDs will be set. If group is a non-negative numeric string and exists in the group database as a group name, the numeric group ID associated with that group name will be used as the group ID. argument sh and ksh only. Options and/or operand of the newgrp command.

EXAMPLES

newgrp - return you to a prompt of a new shell.