A cluttered desktop can be a source of distraction and reduce productivity. If you’re using Ubuntu and prefer a clean and organized workspace, hiding your desktop icons can be a great solution. This comprehensive guide will show you how to use terminal commands to hide or show desktop icons on Ubuntu, providing a more focused and streamlined desktop environment.

Understanding the Ubuntu Desktop Environment

Ubuntu’s default desktop environment is GNOME, which is highly customizable. GNOME’s settings, including those for desktop icons, can be managed through the terminal, offering a powerful way to tailor your desktop experience.

Step 1: Open the Terminal

The terminal is a powerful tool for making system-wide changes. You can open it by pressing Ctrl + Alt + T or by searching for ‘Terminal’ in your applications menu.

Step 2: Hide Desktop Icons Using Gsettings

The Gsettings command-line tool allows you to modify GNOME settings. To hide all desktop icons, enter the following command:

gsettings set org.gnome.desktop.background show-desktop-icons false

This command changes the visibility setting of desktop icons to ‘off’.

Step 3: Verify the Changes

Once you’ve executed the command, your desktop icons should disappear. If they remain visible, try restarting the GNOME Shell by pressing Alt + F2, typing r, and pressing Enter.

Step 4: Reverting the Changes

If you wish to see your desktop icons again, run the command:

gsettings set org.gnome.desktop.background show-desktop-icons true

This will toggle the visibility of your desktop icons back to ‘on’.

Customizing Individual Icons

If you want to hide specific icons rather than all, you can do so by renaming the files or folders to start with a dot (.), which makes them hidden in Linux. For example, renaming a folder from ‘Documents’ to ‘.Documents’ will hide it from the desktop but still accessible via the file manager.

Frequently Asked Questions (FAQs)

Here are some common questions and answers to help you manage your Ubuntu desktop icons more effectively:

  • Can I hide individual desktop icons using terminal commands?
    Yes, you can move specific icons out of the desktop directory or rename them with a dot prefix to hide them individually.
  • Do these terminal commands work on all versions of Ubuntu?
    The commands provided are specific to GNOME 3 and later, which is the default environment for Ubuntu 17.10 and above. For older versions or different desktop environments, the commands may vary.
  • Is there a way to hide icons without using terminal commands?
    Yes, you can use the GNOME Tweaks tool to manage desktop icons without the terminal. Install it with sudo apt install gnome-tweaks and navigate to the Desktop section to toggle icon visibility.
  • How can I hide system icons like ‘Trash’ or ‘Home’?
    These icons can be managed through GNOME Extensions or GNOME Tweaks. You can also use the gsettings command to adjust their visibility.

Advanced Customization and Tips

For those who want to delve deeper into desktop customization, here are some advanced tips:

  • Explore GNOME Shell Extensions for additional functionality and customization options.
  • Use the dconf-editor for a graphical interface to change GNOME settings. Install it with sudo apt install dconf-editor.
  • Automate the hiding and showing of icons with scripts that can be triggered based on certain events or schedules.
  • Consider using alternative file managers or desktop environments if you require more extensive customization options.


By following this guide, you now know how to hide desktop icons on Ubuntu using terminal commands. This is just one aspect of customizing your Ubuntu experience. With the power of the terminal and the flexibility of GNOME, you can tailor your desktop to fit your needs and preferences perfectly.

Additional Resources

To further enhance your knowledge and customization skills, consider visiting the official Ubuntu help page and the GNOME help documentation. These resources offer a wealth of information for both beginners and advanced users looking to get the most out of their Ubuntu system.