$ ./guess_the_languageLinux CLI
Linux CLI · medium · #59

What does this command do?

sudo -u postgres psql
  1. Runs psql as the postgres user
  2. Creates a user named postgres
  3. Logs postgres out of all sessions
  4. Grants postgres sudo rights
sudo -u USER runs the command as that user instead of root.
Play Linux CLI ▸