I forgot to install the desktop environment while installing Debian 12.

I'm stuck in tty1 when installing, no GUI, only text. I've asked on a Facebook group, and people there say I forgot to install the desktop environment.

What should I do?

  • 5
    If it's a fresh install, just reinstall.
    – muru
    Commented Feb 6 at 7:31
  • su -c apt install gnome
    – Stewart
    Commented Feb 7 at 13:18

3 Answers 3


Assuming you want to continue from where you are now, these instructions will help you get the graphical interface installed. However, since you are using a freshly installed system you might find it easier simply to rerun the installation from scratch, this time remembering to include the desired graphical interface.

  1. Log in using the username and password you set up earlier. You will not see anything when you type in the password. No stars. Nothing. Remember to hit Enter at the end of the username and password rather than Tab. You cannot use either the mouse or cursor keys at this point (if you make a mistake, delete what you've typed with Backspace, do not try to move back with the cursor.)

    Username: ari
    Password: _
    Linux pi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l
    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    ari:~$ _

    You now have a prompt (it will typically end with $) at which you can enter commands. I've shown the cursor as _. In your case it may be a flashing line or block.

  2. Run su -c tasksel (and hit Enter). Enter the root password you set for the root account during installation when prompted (remember you'll see nothing happen while you type the password):

    ari:~$ su -c tasksel
    Password: _

    Alternatively, if you have already installed sudo or definitely did not set a root password, try using sudo tasksel (and hit Enter). Enter your password if/when prompted:

    ari:~$ sudo tasksel
    Sudo password for ari: _

    Either way, you should start the Task Selection tool, which will look something like this:

    Package configuration      
     ┌───────────────────────┤ Software selection ├────────────────────────┐
     │ You can choose to install one or more of the following predefined   │
     │ collections of software.                                            │
     │                                                                     │
     │ Choose software to install:                                         │
     │                                                                     │
     │    [*] Debian desktop environment                                   │
     │    [ ] ... GNOME                                                    │
     │    [ ] ... Xfce                                                     │
     │    [ ] ... GNOME Flashback                                          │
     │    [ ] ... KDE Plasma                                               │
     │    [ ] ... Cinnamon                                                 │
     │    [*] ... MATE                                                     │
     │    [ ] ... LXDE                                                     │
     │    [ ] ... LXQt                                                     │
     │    [ ] web server                                                   │
     │    [ ] SSH server                                                   │
     │    [ ] laptop                                                       │
     │                                                                     │
     │                                                                     │
     │                  <Ok>                      <Cancel>                 │
     │                                                                     │
  3. Using the cursor keys to move up and down and Space to select/deselect, choose the Debian desktop environment. By default this will automatically include GNOME, but you might prefer Cinnamon or MATE. You'll see * alongside the two items you select.

  4. Use Tab to move to the <Ok> item and hit Space once more to accept

  • 8
    @Ari: If you don't know how to use the command line at all yet, it might be easier to reinstall from scratch and remember to include a GUI this time, so you have a more complete system to play with while you get used to things like "command not found" meaning you might have made a typo, so you should recheck the spelling of the command someone suggested. Also so you'll have a GUI terminal with mouse for copy/paste from web pages, or more easily look at them at the same time as you're trying stuff like tab for auto-completion. Commented Feb 7 at 8:33
  • I tried reinstalling and using hotspot and it worked to install xfce, thank you in advance
    – Ari
    Commented Feb 8 at 3:36

The best way is to use tasksel as said @Chris Davies.

Alternatively, you can display the available desktop env by looking to Recommends packages in apt show task-desktop:

Recommends: task-gnome-desktop | task-xfce-desktop | task-kde-desktop | task-lxde-desktop | 
task-gnome-flashback-desktop | task-cinnamon-desktop | task-mate-desktop | task-lxqt-desktop,...

Then install the desired desktop env with its dependencies, e,g:

sudo apt install task-gnome-desktop

Note : On Debian 12, caret ^ at the end of task-name in apt install isn't allowed.

Using tasksel non interactively. To list tasks:

 tasksel --list-tasks

i desktop   Debian desktop environment
u gnome-desktop GNOME
u xfce-desktop  Xfce
u gnome-flashback-desktop   GNOME Flashback
u kde-desktop   KDE Plasma
u cinnamon-desktop  Cinnamon
u mate-desktop  MATE
u lxde-desktop  LXDE
u lxqt-desktop  LXQt
u web-server    web server
u ssh-server    SSH server
i laptop    laptop

To install:

sudo tasksel install gnome-desktop

Debian Wiki: Installation of a desktop environment

  • It says N: unable to locate package desktop-task N: unable to locate package desktop-task E:No packages found
    – Ari
    Commented Feb 6 at 2:46
  • 6
    @Ari desktop-task and task-desktop are not the same.
    – hobbs
    Commented Feb 6 at 4:58

While the above are good answers, suggest we reduce this to just:

sudo apt install task-desktop

That is it. When you are new to Linux, the default desktop is fine. It seems that Chris's excellent instructions got you logged in. Use the above command once logged in.

I am a few decades since new, and found the default desktop fine. :)

The other choices are just noise - when you are new.

(Also, I did not know about the "task-*" targets in apt. Thanks GAD.)


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .