DEV Community

ダニエリ for WoMakersCode

Posted on

5 2

[Tutorial Linux] Terminal: Informações sobre o usuário

Para verificar seu nome de usuário, digite no terminal:

$ whoami
Enter fullscreen mode Exit fullscreen mode
  • $ indica que você deve usar o usuário comum para fazer essa operação.

  • whoami comando que identifica o usuário.

who am I

Para verificar os usuários que estão conectados a máquina.

$ who
Enter fullscreen mode Exit fullscreen mode
  • who retorna quem está logado na máquina

É possível estar conectado e não ser o usuário (no caso de servidores).

who

Para verificar os dados do usuário e os grupos o qual ele faz parte, digite:

$ id
Enter fullscreen mode Exit fullscreen mode

id

Com o argumento -u temos o número de identificação do usuário atual.

$ id -u
Enter fullscreen mode Exit fullscreen mode

id -u

Com o argumento -un temos apenas o nome do usuário atual.

$ id -un
Enter fullscreen mode Exit fullscreen mode

id -un

Para saber a quais grupos o usuário atual pertence, digite:

$ groups
Enter fullscreen mode Exit fullscreen mode

groups

Para saber a quais grupos um determinado usuário pertence, digite:

$ groups <nome_do_usuário>
Enter fullscreen mode Exit fullscreen mode
  • digite o nome do usuário sem os sinais < >.

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

AWS Security LIVE!

Hosted by security experts, AWS Security LIVE! showcases AWS Partners tackling real-world security challenges. Join live and get your security questions answered.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️