Skip to content

Orientation

Who am I, where am I, and what is going on on this machine? These are the first commands to run after logging in to a server.

Basics: The first minute on a new server, as a command sequence

Who am I?

  • whoami


    Show the user you are working as.

  • id


    Show user ID, group ID and group memberships.

Which machine am I on?

  • hostname


    Show the host name and IP addresses, or set the name temporarily.

  • hostnamectl


    Show system information and set the host name permanently.

  • uname


    Show kernel release and architecture.

What is going on?

  • uptime


    Show uptime, logged-in users and load average.

  • who


    Show who is logged in and from where.

  • w


    Show who is logged in and what they are doing.

  • last


    Show the login and reboot history.

What time is it on the server?

  • date


    Show date and time, format and calculate dates.

  • timedatectl


    Show and set time zone and time synchronization.