如何在 Ubuntu 20.04 上禁用坞站（dock）
坞站 Dock
左侧的启动器已成为 [Ubuntu](https://ubuntu.com/) 桌面的标识。它是在 [Unity 桌面](https://itsfoss.com/keeping-ubuntu-unity-alive/)中引入的，甚至在 [Ubuntu 切换到 GNOME](https://itsfoss.com/ubuntu-unity-shutdown/)时就有了，它复刻了 “Dash to Panel”，以在 [GNOME](https://www.gnome.org/) 上创建一个类似的<ruby> 坞站 <rt>  dock </rt></ruby>。


就个人而言，我发现它对于快速访问常用应用非常方便，但并非所有人都希望它额外占用屏幕上的一些空间。


从 [Ubuntu 20.04](https://itsfoss.com/download-ubuntu-20-04/) 开始，你可以轻松禁用坞站。在本教程中，让我向你展示如何以图形和命令的方式执行此操作。


![](/data/attachment/album/202007/14/162712xxazukggc49duuy9.png)


### 通过扩展应用禁用 Ubuntu Dock


[Ubuntu 20.04 的主要功能](https://itsfoss.com/ubuntu-20-04-release-features/)之一是引入“<ruby> 扩展 <rt>  Extension </rt></ruby>”应用来管理系统上的 GNOME 扩展。只需在 GNOME 菜单中查找它（按下 Windows 键并输入）：


![Look for Extensions app in the menu](/data/attachment/album/202007/14/162720gdzs3dns0qwh6z0q.jpg)



> 
> 没有找到扩展应用？
> 
> 
> 如果尚未安装，你应该启用 GNOME Shell 扩展，“扩展” GUI 是此软件包的一部分。
> 
> 
> 
> ```
> sudo apt install gnome-shell-extensions
> 
> ```
> 
> 这仅对 [GNOME 3.36](https://itsfoss.com/gnome-3-36-release/) 或 Ubuntu 20.04（或更高版本） 中的更高版本有效。
> 
> 
> 


启动“扩展”应用，你应该在“内置”扩展下看到 Ubuntu Dock。你只需要关闭即可禁用坞站。


![Disable Ubuntu Dock](/data/attachment/album/202007/14/162721dyc4f86ta27cr8sn.png)


更改是即时的，你会看到坞站立即消失。


你可以用相同的方式恢复。只需打开它，它就会立即显示。


在 Ubuntu 20.04 中非常容易隐藏坞站，不是吗？


### 替代方法：通过命令行禁用 Ubuntu 坞站


如果你是终端爱好者，并且喜欢在终端中做事，那么我有一个对你而言的好消息。你可以从命令行禁用 Ubuntu 坞站。


使用 `Ctrl+Alt+T` 打开终端。你可能已经知道 [Ubuntu 中的键盘快捷键](https://itsfoss.com/ubuntu-shortcuts/)。


在终端中，使用以下命令列出所有可用的 GNOME 扩展：



```
gnome-extensions list

```

这将显示类似于以下的输出：


![List GNOME Extensions](/data/attachment/album/202007/14/162723uahlhak0bzrvkxw4.png)


默认的 Ubuntu 坞站扩展是 `ubuntu-dock@ubuntu.com`。你可以使用以下命令将其禁用：



```
gnome-extensions disable ubuntu-dock@ubuntu.com

```

屏幕上不会显示任何输出，但是你会注意到启动器（坞站）从左侧消失了。


如果需要，你可以使用与上面相同的命令再次启用它，但使用启用选项：



```
gnome-extensions enable ubuntu-dock@ubuntu.com

```

### 总结


在 Ubuntu 18.04 中也有禁用坞站的方法。但是，如果你尝试在 18.04 中删除它，这可能会导致不想要的结果。删除此软件包也会删除 ubuntu-desktop 包，最终可能会导致系统崩溃，例如没有应用菜单。


这就是为什么我不建议在 Ubuntu 18.04 上删除它的原因。


好消息是 Ubuntu 20.04 提供了一种隐藏任务栏的方法。用户拥有更大的自由度和更多的屏幕空间。说到更多的屏幕空间，你是否知道可以[从 Firefox 移除顶部标题栏并获得更多的屏幕空间](https://itsfoss.com/remove-title-bar-firefox/)？


我想知道你喜欢怎样的 Ubuntu 桌面？要坞站，不要坞站，还是不要 GNOME？




---


via: <https://itsfoss.com/disable-ubuntu-dock/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

The launcher on the left side has become the identity of [Ubuntu](https://ubuntu.com/) desktop. It was introduced with [Unity desktop](https://itsfoss.com/keeping-ubuntu-unity-alive/) and even [when Ubuntu switched to GNOME](https://itsfoss.com/ubuntu-unity-shutdown/), it forked Dash to Panel to create a [similar dock](https://itsfoss.com/best-linux-docks/) on [GNOME](https://www.gnome.org/) as well.

Personally, I find it handy for quickly accessing the frequently used applications. But not everyone wants it to take some extra space on the screen.

Starting with [Ubuntu 20.04](https://itsfoss.com/download-ubuntu-20-04/), you can easily disable this dock as part of [dock customization in Ubuntu](https://itsfoss.com/customize-ubuntu-dock/). Let me show you how to do that graphically and via command line in this quick tutorial.

## Disable Ubuntu dock with Extensions app

One of the [main features of Ubuntu 20.04](https://itsfoss.com/ubuntu-20-04-release-features/) was the introduction of Extensions to manage GNOME extensions on your system. Just look for it in the GNOME menu (press Windows key and start typing):

![Gnome Extensions App Ubuntu](https://itsfoss.com/content/images/wordpress/2020/06/GNOME-extensions-app-ubuntu.jpg)

If you don’t have it installed already, you should enable GNOME Shell Extensions. The Extensions GUI app is part of this package.

This is only valid for [GNOME 3.36](https://itsfoss.com/gnome-3-36-release/) or higher versions available from Ubuntu 20.04.

`sudo apt install gnome-shell-extensions`


Start the extensions app and you should see Ubuntu Dock under the Built-in extensions section. You just have to toggle the button off to disable the dock.

![Disable Ubuntu Dock](https://itsfoss.com/content/images/wordpress/2020/06/disable-ubuntu-dock.png)

The change is immediate and you’ll see that dock disappears immediately.

You can bring it back the same way. Just toggle it on and it will appear immediately.

So easy to hide the dock in Ubuntu 20.04, isn’t it?

## Alternative Method: Disable Ubuntu dock via command line

If you are a terminal enthusiast and prefer to do things in the terminal, I have good news for you. You can disable the Ubuntu dock from command line.

Open a terminal using Ctrl+Alt+T. You probably already know that [keyboard shortcut in Ubuntu](https://itsfoss.com/ubuntu-shortcuts/).

In the terminal, use the following command to list all the available GNOME extensions:

`gnome-extensions list`


This will show you an output similar to this:

![List GNOME Extensions](https://itsfoss.com/content/images/wordpress/2020/06/list-gnome-extensions.png)

The default Ubuntu dock extension is [[email protected]](/cdn-cgi/l/email-protection). You can disable it using this command:

`gnome-extensions disable `[[email protected]](/cdn-cgi/l/email-protection)


There will be no output message displayed on the screen but you’ll notice that the launcher or dock disappears from the left side.

If you want, you can enable it again using the same command as above but with enable option this time:

`gnome-extensions enable `[[email protected]](/cdn-cgi/l/email-protection)


## Conclusion

Docks are actually handy. Perhaps you disabled the dock to try something else? If that's the case, here are some suggestions.

[7 Docks to Customize Your Linux DesktopA dock has been an important part of the Linux desktop experience for decades. It provides a handy way of quickly accessing your favorite, frequently used applications. Unfortunately, the popular desktop environment GNOME doesn’t provide a dock. Fret not. You can always install a Docking applicati…](https://itsfoss.com/best-linux-docks/)![](https://itsfoss.com/content/images/wordpress/2022/07/best-linux-docks.jpg)


![](https://itsfoss.com/content/images/wordpress/2022/07/best-linux-docks.jpg)

There are ways to disable the dock in Ubuntu 18.04 as well. However, it may lead to unwarranted situations if you try to remove it in 18.04. Removing this package also removes the ubuntu-desktop package and you may end up with a system with broken functionalities like no application menu.

This is the reason why I won’t recommend removing it on Ubuntu 18.04.

It’s good that Ubuntu 20.04 gives a way to hide the taskbar. Users have more freedom and more screen space. Speaking of more screen space, did you know that you can [remove the top title bar from Firefox and gain more screen space](https://itsfoss.com/remove-title-bar-firefox/)?

I am wondering how do you prefer your Ubuntu desktop. With the dock, without a dock or without GNOME?