> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Install All Essential Media Codecs in Ubuntu With This Single Command [Beginner's Tip]
- URL: https://itsfoss.com/install-media-codecs-ubuntu/
- Published: 2020-02-09T16:09:23.000Z
- Updated: 2023-02-06T12:45:33.000Z
- Description: Ubuntu Restricted Extras is a single package that allows you to install all the essential media codecs to run files like MP3, h264 on Ubuntu-based distributions.
- Author: Abhishek Prakash
- Tags: Ubuntu

If you have just installed Ubuntu or some other [Ubuntu flavors](https://itsfoss.com/which-ubuntu-install/) like Kubuntu, Lubuntu etc, you’ll notice that your system doesn’t play some audio or video file.

For video files, you can [install VLC on Ubuntu](https://itsfoss.com/install-latest-vlc/). [VLC](https://www.videolan.org/index.html?ref=itsfoss.com) one of the [best video players for Linux](https://itsfoss.com/video-players-linux/) and can play almost any video file format. But you’ll still have troubles with audio media files and flash player.

The good thing is that [Ubuntu](https://ubuntu.com/?ref=itsfoss.com) provides a single package to install all the essential media codecs: ubuntu-restricted-extras.

![Media Codecs In Ubuntu](https://itsfoss.com/content/images/wordpress/2020/02/Media_Codecs_in_Ubuntu.png)

## What is Ubuntu Restricted Extras?

The ubuntu-restricted-extras is a software package that consists various essential software like flash plugin, [unrar](https://itsfoss.com/use-rar-ubuntu-linux/), [gstreamer](https://gstreamer.freedesktop.org/?ref=itsfoss.com), mp4, codecs for [Chromium browser in Ubuntu](https://itsfoss.com/install-chromium-ubuntu/) etc.

Since these software are not open source and some of them involve software patents, Ubuntu doesn’t install them by default. You’ll have to use multiverse repository, the software repository specifically created by Ubuntu to provide non-open source software to its users.

Please read this article to [learn more about various Ubuntu repositories](https://itsfoss.com/ubuntu-repositories/).

[What are Ubuntu Repositories? How to enable or disable them?This detailed article tells you about various repositories like universe, multiverse in Ubuntu and how to enable or disable them. So, you are trying to follow a tutorial from the web and installing a software using apt-get command and it throws you an error: E: Unable to locate package xyz![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAbhishek Prakash![](https://itsfoss.com/content/images/wordpress/2019/03/ubuntu-repositories.png)](https://itsfoss.com/ubuntu-repositories/)

## How to install Ubuntu Restricted Extras?

I find it surprising that the software center doesn’t list Ubuntu Restricted Extras. In any case, you can install the package using command line and it’s very simple.

[Open a terminal in Ubuntu](https://itsfoss.com/open-terminal-ubuntu/) by searching for it in the menu or using the [terminal keyboard shortcut Ctrl+Alt+T](https://itsfoss.com/ubuntu-shortcuts/).

Since ubuntu-restrcited-extras package is available in the multiverse repository, you should verify that the multiverse repository is enabled on your system:

```
sudo add-apt-repository multiverse
```

You may want to update the package cache if you are not running Ubuntu (Ubuntu does it automatically):

```
sudo apt update
```

And then you can install it in Ubuntu default edition using this command:

```
sudo apt install ubuntu-restricted-extras
```

When you enter the command, you’ll be asked to enter your password. When ****you type the password, nothing is displayed on the screen***. That’s normal. Type your password and press enter.

It will show a huge list of packages to be installed. Press enter to confirm your selection when it asks.

You’ll also encounter an [EULA](https://en.wikipedia.org/wiki/End-user%5Flicense%5Fagreement?ref=itsfoss.com) (End User License Agreement) screen like this:

![Installing Ubuntu Restricted Extras](https://itsfoss.com/content/images/wordpress/2020/02/installing_ubuntu_restricted_extras.jpg)

Press Tab key to select OK and press Enter key

It could be overwhelming to navigate this screen but don’t worry. Just press tab and it will highlight the options. When the correct options are highlighted, press enter to confirm your selection.

![Installing Ubuntu Restricted Extras ](https://itsfoss.com/content/images/wordpress/2020/02/installing_ubuntu_restricted_extras_1.jpg)

Press Tab key to highlight Yes and press Enter key

Once the process finishes, you should be able to play MP3 and other media formats thanks to newly installed media codecs.

## Installing restricted extra package on Kubuntu, Lubuntu, Xubuntu

Do keep in mind that Kubuntu, Lubuntu and Xubuntu has this package available with their own respective names. They should have just used the same name but they don’t unfortunately.

On Kubuntu, use this command:

```
sudo apt install kubuntu-restricted-extras
```

On Lubuntu, use:

```
sudo apt install lubuntu-restricted-extras
```

On Xubuntu, you should use:

```
sudo apt install xubuntu-restricted-extras
```

I always recommend getting ubuntu-restricted-extras as one of the [essential things to do after installing Ubuntu](https://itsfoss.com/things-to-do-after-installing-ubuntu-18-04/). It’s good to have a single command to install multiple codecs in Ubuntu.

I hope you like this quick tip in the Ubuntu beginner series. I’ll share more such tips in the future.