Steam Deck Web App Generator
STEAM DECK SUDO PASSWORD

Setting a sudo password on Steam Deck

By ยท

If a guide tells you to run a command with sudo and Konsole asks for a password you never set, this is why: the Steam Deck ships without one. You create it yourself, once, with one command.

Why there is no default password

Valve's Steam Deck Desktop FAQ says the default deck user is shipped with no password. Valve calls that a secure setting: with no password, nobody can log in over ssh, and nothing can run through sudo. So there is no factory password to look up.

How to set the sudo password

  1. Press STEAM, open Power and choose Switch to Desktop. The Desktop Mode guide covers the controls.
  2. Open Konsole from the application menu in the lower left corner. Press STEAM + X if you need the keyboard.
  3. Type the command below and press Enter.
passwd
  1. Type a new password and press Enter. Konsole shows nothing while you type, not even dots. That is normal.
  2. Type it again to confirm. Konsole confirms the change.

From then on, sudo asks for this password. Valve's FAQ puts it simply: after setting it you can use sudo anywhere elevation is required. Pick something you will remember, and store it somewhere safe.

How to change it later

Run passwd again. Once a password exists, the command asks for the current one before it accepts a new one.

If you forgot the password

Valve's documentation does not describe a way to recover or reset a forgotten deck password. The tools it does document are on its SteamOS recovery page:

  • Factory Reset, under STEAM, Settings, System. It clears all local data, including installed games, and reinstalls Steam and SteamOS.
  • Re-imaging SteamOS from a recovery image, which wipes everything on the device.

Both remove far more than a password, and games will need to download again. If you only wanted sudo for one task, check first whether you need it at all: most things people do in Desktop Mode work without it.

When you actually need sudo

You do not need a password for:

  • installing apps from the Discover Software Center, or with flatpak install as your own user,
  • adding programs to Steam as non-Steam games,
  • running this site's generated script, which writes a launcher to your Documents folder and calls steamos-add-to-steam as the deck user.

Changes to the system itself are what need it. Valve's example is sudo steamos-readonly disable, which makes the read-only system image writable, and it wraps that example in warnings: be careful with commands and scripts you find online, and expect anything installed outside flatpak, for example with pacman, to be wiped by the next SteamOS update.

Using the generator without sudo

The generator turns a website into a Game Mode shortcut that opens in Chrome. Every step runs as the normal deck user:

  1. In Game Mode, press the STEAM button, open Power and choose Switch to Desktop.
  2. Install Google Chrome from the Discover Software Center if you don't have it yet. The generated script starts the Chrome flatpak (com.google.Chrome), which is the version Discover installs.
  3. Open the generator in a browser on the Deck. Enter https://www.youtube.com as the Site URL and YouTube as the App Name. Leave Use ~/Documents as default folder switched on.
  4. Press Generate script, then Download .sh. The file is saved as youtube.sh.
  5. Open Konsole in the folder you downloaded it to and run:
    chmod +x youtube.sh
    ./youtube.sh
    The script writes a small launcher, ~/Documents/YouTube.sh, makes it executable and hands it to steamos-add-to-steam, which adds it to your Steam library as a non-Steam game.
  6. Double-click Return to Gaming Mode on the desktop. The shortcut is in your Library under Non-Steam, listed as YouTube.sh. You can rename it in the shortcut's Properties.
  7. Launch it. Chrome opens https://www.youtube.com full screen in kiosk mode, with no tabs, address bar or scrollbars. To close it, press STEAM and choose Exit Game.

Before you run it

  • The App Name becomes the launcher's file name, so spaces and apostrophes are fine but a slash is not.
  • Leave ~/Documents/YouTube.sh where it is. The Steam shortcut points at that file.
  • The launcher uses your normal Chrome profile, so a site you sign in to in Chrome on the desktop is still signed in when you open the shortcut in Game Mode. Inside Game Mode, STEAM + X brings up the on-screen keyboard.
  • The script does not set a controller layout. Pick one in the shortcut's controller settings. Microsoft's and NVIDIA's own Steam Deck guides both use the Gamepad with Mouse Trackpad template for their browser and app shortcuts, which gives you a pointer on the trackpad.

Questions

What is the default sudo password on Steam Deck?

There is none. Valve ships the default deck user with no password, which blocks ssh access and means sudo cannot be used until you set one with the passwd command.

How do I set a sudo password on Steam Deck?

Switch to Desktop Mode, open Konsole, type passwd and press Enter, then type the new password twice. Nothing appears on screen while you type it. After that, sudo accepts that password.

How do I change my Steam Deck password?

Run passwd again in Konsole. It asks for the current password first, then the new one twice.

I forgot my Steam Deck sudo password. What now?

Valve does not document a way to recover it. Its SteamOS recovery page lists a Factory Reset, which clears all local data and reinstalls Steam, and a full re-image. Write the password down so you do not need either.

Do I need a sudo password to install apps?

No. The Discover Software Center installs flatpak apps without it, and this site's generator script does not use sudo either.