Ubuntu Linux

3 Steps to Play DVD in Ubuntu Linux (Fix Codecs)

Richard
Written by
Richard
Jun 30, 2022 Updated Apr 19, 2026 3 min read
3 Steps to Play DVD in Ubuntu Linux (Fix Codecs)

If you are trying to play a DVD on Ubuntu, you might notice it doesn’t work right away. This is because Ubuntu does not come with the tools needed to decode protected movie files by default. To fix this, you need to install-programs-in-ubuntu-linux/" class="sal-link" rel="noopener" target="_blank" data-sal-id="15885">install specific software called codecs.

Why do I need to do this?

Most commercial DVDs use encryption to prevent illegal copying. Ubuntu respects these rules, so it won’t play the movies until you install the right tools to unlock them. Without these “codecs” %%LNK0%%, your computer simply cannot read the data on the disc.

What happens when I finish?

Once you complete these steps, your computer will be able to recognize and play encrypted DVDs and most common video file formats using your favorite media player.

Note: The following steps require admin privileges. You will need to enter your computer password when prompted.

First, we need to enable the multiverse repository and install the main package. Open your terminal and run these commands:

🐧Bash / Shell
sudo add-apt-repository multiverse
sudo apt install libdvd-pkg

When you see a prompt on your screen, select “Ok” to continue.

💻Code
┌───────────────────────────────────────────────┤ Configuring libdvd-pkg ├───────────────────────────────────────────────┐
│This package automates the process of launching downloads of the source files for libdvdcss2 from videolan.org,
compiling them, and installing the binary packages (libdvdcss2 libdvdcss-dev). Please run
"sudo dpkg-reconfigure libdvd-pkg" to launch this process for the first time.

Next, you will be asked to confirm the installation. Choose “Yes.”

💻Code
┌───────────────────────────────────────────────┤ Configuring libdvd-pkg ├───────────────────────────────────────────────┐
│ │
│ If activated, the APT post-invoke hook takes care of future automatic upgrades of libdvdcss2 (which may be triggered │
│ by new versions of libdvd-pkg). When updates are available, the hook will launch the process of downloading the │
│ source, recompiling it, and (if "apt-get check" reports no errors) using "dpkg -i" to install the new versions. │
│ │
│ Alternatively, the process can be launched manually by running "sudo dpkg-reconfigure libdvd-pkg". │
│ │
│ Enable automatic upgrades for libdvdcss2? │
│ │

│ │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Terminal command window installing libdvd-pkg to play DVDs on Ubuntu Linux

Depending on your version of Ubuntu, you may need extra tools to ensure everything works correctly. Run these commands to install them:

🐧Bash / Shell
sudo apt install libdvdread7
sudo apt install libdvdread8
sudo apt install libdvdread4
sudo apt install libdvdnav4

Finally, to make sure your web browser and other apps can handle various video formats, run this command:

🐧Bash / Shell
sudo apt install gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
sudo apt install ubuntu-restricted-extras

Summary

To watch DVDs on Ubuntu, you must install the libdvd-pkg library. This package provides the necessary codecs to bypass encryption. By enabling the multiverse repository and installing the additional restricted extras, you ensure that your system can play almost any video file or physical DVD disc you insert.

How can I play DVDs on Ubuntu Linux?

To play DVDs on Ubuntu Linux, you need to install the correct codecs, specifically the libdvd-pkg package. You can do this by enabling the multiverse repository and running the commands 'sudo add-apt-repository multiverse' followed by 'sudo apt install libdvd-pkg'.


Why won't my DVD play on Ubuntu?

Ubuntu does not play encrypted or protected DVDs out of the box due to licensing issues. You need to install additional software, such as libdvdcss2, to enable playback of these DVDs.


What is libdvd-pkg and why do I need it?

libdvd-pkg is a package that automates the installation of the necessary libraries to play encrypted DVDs on Ubuntu. It helps download, compile, and install libdvdcss2, which is essential for decoding protected DVD content.


How do I enable the multiverse repository in Ubuntu?

To enable the multiverse repository in Ubuntu, open a terminal and run the command 'sudo add-apt-repository multiverse'. This allows you to access additional software packages, including those needed for DVD playback.


What should I do if my DVD has a region code?

If your DVD has a region code that doesn't match your Ubuntu system's region settings, it may not play. You can check and change your region settings or use a region-free DVD player software to bypass this restriction.

Was this guide helpful?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, the owner and lead writer at Geek Rewind, is a tech enthusiast passionate about simplifying complex IT topics. His years of hands-on experience in system administration and enterprise IT operations have honed his ability to provide practical insights and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

2454 articles → Twitter

📚 Related Tutorials

How to Install Ubuntu Linux
Ubuntu Linux How to Install Ubuntu Linux
How to Install Additional Software on Ubuntu
Ubuntu Linux How to Install Additional Software on Ubuntu

0 responses to “3 Steps to Play DVD in Ubuntu Linux (Fix Codecs)”

  1. Hi I just installed Ubunto 18.10 and I’ve tried various ways to install the DVD pkg without success qnd could use some guidance how to get my computer to play dvds otherwise this program is useless to me if I can’t manage to get the most simple thing to work plse help me. I am q new user to Linux it was suggested by a friend of mine who’s now deceased qnd can’t help me.

Leave a Reply

Your email address will not be published. Required fields are marked *