Ubuntu – How to install common media codecs


I'm new to Ubuntu. I tried installing it with Windows 8.1, but failed I lost all my files.

I have successfully formatted my PC and installed Ubuntu, but how do I install codecs to play audio and videos files ?

Best Answer

Open a terminal (Ctrl + Alt + T) and paste the following code :

sudo apt-get install ubuntu-restricted-extras 

Or install using Ubuntu Software center :

Install via the software center

It will install proprietary codecs needed for reading audio and video files.

Alternatively you can use VLC Media Player which can play most of the audio/video formats :

sudo apt-get install vlc