Skip to content

How to refresh in Ubuntu?

  • by
  • 4 min read

One of the best things about Linux is diagnosing just about everything on the terminal. Whether it’s system errors or a simple desktop environment refresh, you need to type in a few commands, and you’re good to go. 

Restarting our computers can often take a lot of time, even with SSDs speeding up the process as the computer has to load all the required files and any programs required to run at boot in the memory. If you’ve accidentally broken something, resetting your desktop can be quicker. 

In this article, we’re looking at how you can refresh different desktop environments in Ubuntu and other Linux distros without having to restart your PC. 

Also read: How to fix Curl command not found on Linux? 


Refreshing Ubuntu desktop environments

There are two major Linux desktop environments that we’ll be covering.

  • GNOME
  • Unity

GNOME

GNOME has been the default Ubuntu launcher since Ubuntu 17.10. You can reset the desktop environment using either the GUI or the terminal. 

If you’re using the GUI, follow these steps:

Step 1: Press Alt + F2 to open the command box. Note that if you’re on a laptop, you may also have the press the Fn key if the aforementioned key combination doesn’t work. 

Step 2: Type and hit enter. 

How to refresh in ubuntu?

If you’d rather use the terminal, just run the following command.

gnome-shell --replace & disown
How to refresh in ubuntu?

On Unity

Follow these steps if you’re running an older version of Ubuntu that uses Unity as the desktop environment.

Step 1: Press Alt + F2 to open the command box. Note that if you’re on a laptop, you may also have the press the Fn key if the aforementioned key combination doesn’t work. 

Step 2: Type unity and hit enter. 

How to refresh in ubuntu?

Resetting desktop on other Linux distros

If you’re using any other Linux distro, here’s how you can reset your desktop.

Cinnamon

Cinnamon provides an easy way to reset the desktop straight from the GUI. All you have to do is right-click any desktop panels, head over to Troubleshoot and click Restart Cinnamon. 

Alternatively, you can also use the Ctrl + Alt + Esc keyboard shortcut to reset your desktop. Do keep in mind that this shortcut is exclusive to Cinnamon. 


KDE Plasma

Unlike GNOME or Cinnamon, you will have to resort to the command line to reset your desktop here. Just enter the following command in the terminal and hit enter.

kquitapp5 plasmashell && kstart5 plasmashell

As soon as you hit enter, your desktop will go blank and then restart. The whole process might take a couple of seconds. If you’re using a lot of Plasma applets, you might want to refresh your configuration file as well. You can do that by using the following command.

mv ~/.config/plasma-org.kde.plasma.desktop-appletsrc old-configuration

Restart your desktop again to see any changes. 


Xfce

Resetting the Xfce desktop is a two-step process. First, you have to restart all the panels and the window manager itself. 

xfce4-panel -r && xfwm4 --replace

However, at times simply resetting the desktop environment might not be enough. You can reset the desktop to its default state by using the commands below.

xfconf-query -c xfce4-panel -p / -R -r
xfce4-panel -r

LXDE

Use the following command to restart the LXDE desktop environment.

lxpanelctl restart && openbox --restart

Alternatively, if you want to reset the desktop to its default state, you can use the following command to move the configuration files forcing LXDE to regenerate them.

mv ~/.config/lxpanel lxpanel.bak

Also read: What does ./ mean in Linux?

Yadullah Abidi

Yadullah Abidi

Yadullah is a Computer Science graduate who writes/edits/shoots/codes all things cybersecurity, gaming, and tech hardware. When he's not, he streams himself racing virtual cars. He's been writing and reporting on tech and cybersecurity with websites like Candid.Technology and MakeUseOf since 2018. You can contact him here: yadullahabidi@pm.me.

>