ubuntu中查看所有的用户信息
2013-06-09 10:53
239 查看
What is the command to list users in ubuntu?. In this tutorial i’ll share How to List all users in ubuntu via command line. you can easily list users in ubuntu using the cat command as follows:
OR you can view per page ,use following commands
Output :
All fields are separated by a colon (:) symbol. Total seven fields exists. The first field is username. It is used when user logs in. It should be between 1 and 32 characters in length
you can also list only usernames with command awk , type these command in terminal :
Here’s example outputs of command above:
$ cat /etc/passwd
OR you can view per page ,use following commands
less /etc/passwd more /etc/passwd
Output :
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh proxy:x:13:13:proxy:/bin:/bin/sh ........... .........
All fields are separated by a colon (:) symbol. Total seven fields exists. The first field is username. It is used when user logs in. It should be between 1 and 32 characters in length
you can also list only usernames with command awk , type these command in terminal :
awk -F':' '{ print $1}' /etc/passwd
Here’s example outputs of command above:
root daemon bin sys sync games man lp mail news uucp proxy www-data backup list irc gnats nobody ..... .....
相关文章推荐
- Ubuntu 下查看所有用户信息
- Ubuntu下查看所有登陆用户及其进程id
- linux如何查看所有的用户和组信息?
- linux查看所有的用户和组信息
- 针对不同数据库,获取当前用户所有有权限查看的表,以及表的创建时间、更新时间、注释等信息,表中字段的相关信息(包含分页实现)
- ubuntu下如何查看用户登录及系统授权相关信息
- 查看数据库所有用户表及其列信息
- Ubuntu 查看所有用户
- 查看数据库所有用户表及其列信息
- linux下如何查看所有的用户和组信息?
- linux如何查看所有的用户和组信息?
- MongoDB 查看所有用户账号信息
- ubuntu查看所有用户/用户组
- Linux如何查看所有的用户和组信息
- linux下如何查看所有的用户和组信息?
- linux下查看所有用户及所有用户组的信息
- ubuntu下如何查看用户登录及系统授权相关信息【转】
- 查看数据库所有用户表及其列信息
- linux如何查看所有的用户和组信息
- linux如何查看所有的用户和组信息?