Linux:用户&用户组操作&Shell 常用通配符

用户:
查看用户:whoami、who am i、who mom likes
创建用户:adduser dgw
切换登录用户:su -l dgw
退出当前用户: exit
删除用户:deluser dgw --remove-home

用户组:
查看用户所在组:groups dgw
加入组:usermod -G sudo dgw

* 匹配 0 或多个字符
? 匹配任意一个字符
[list] 匹配 list 中的任意单一字符
[!list] 匹配 除list 中的任意单一字符以外的字符
[c1-c2] 匹配 c1-c2 中的任意单一字符 如:[0-9] [a-z]
{string1,string2,...} 匹配 sring1 或 string2 (或更多)其一字符串
{c2..c2} 匹配 c1-c2 中全部字符 如{1..10}

你可能感兴趣的:(linux,运维,服务器)