Ubuntu Linux play encrypted DVDs

Q. How do I play encrypted DVDs under Ubuntu Linux?

A. You need to install a special library which allows you to play encrypted DVDs under Ubuntu Linux.

In this FAQ you will learn how to use linux command line to install CSS library and DVD playback using open source linux software such as xine.

Ubuntu Linux will not be able to play most of the DVDs out of box. Please read this my article which explains why linux don’t support MP3 and DVD out of box.

Now let us see how to configure Ubuntu Linux to play encrypted DVDs .

Most DVDS comes with Content Scramble System (CSS) which is a Digital Rights Management (DRM) scheme. The CSS key sets are licensed to manufacturers who incorporate them into products such as DVD drives, DVD players and DVD movie releases. Most DVD players are equipped with a CSS Decryption module. CSS key is a collective term for authentication key, disc key, player key, title key, second disk key set, and/or encrypted key.

In order to play encrypted DVDs just install CSS library with following linux command

First install open source Linux player such as vlc or xine, mplayer etc using apt-get command:
$ sudo apt-get install vlc xine mplayer libdvdread3

Now install CSS library:
$ sudo /usr/share/doc/libdvdread3/examples/install-css.sh

Now you can play DVD by visiting Applications > Sound & Video > Movie Player > Select player menu option.

Updated for accuracy.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 73 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
73 comments… add one
  • Daniel K Dec 19, 2006 @ 7:06

    You wrote:

    $ sudo apt-get install vlc xine mplyer

    I guess you mean

    $ sudo apt-get install vlc xine mplayer

    • pmcartney Jun 4, 2011 @ 7:01

      Ubuntu 10.04 (i386, amd64), 10.10 and 11.04 (i386, amd64)

      Works for old releases that are no longer supported if you have repositories on Cd/Dvd or somewhere. So, anything from 9.04 onwards. The latest LTS, 10.04, and the radically different 11.04 also work this way.

      Install the libdvdread4 package (no need to add third party repositories) via Synaptic or command line:

      sudo apt-get install libdvdread4

      Then open a terminal window and execute:

      sudo /usr/share/doc/libdvdread4/install-css.sh

      Rebooting may be necessary.

      • Bruno Jun 6, 2011 @ 4:20

        Thank you! I use natty and it works!

      • Torfin Jul 25, 2011 @ 6:39

        sudo apt-get install libdvdread4

        sudo /usr/share/doc/libdvdread4/install-css.sh

        Worked Perfect for my 11.04 Thanks!

      • Amogh Rajanna Jan 1, 2012 @ 23:15

        Thanks for the update. Works well on Ubuntu 11.10….

      • Mr. Jan Hearthstone Apr 8, 2012 @ 23:47

        Thank you! Thank you! Thank you! Thank you!

      • Aoife Mar 28, 2013 @ 20:46

        You are my new favourite person! Thanks for this.

      • greg letbetter Jul 20, 2013 @ 21:30

        This really worked for me, I thank you for the info.

      • SPA Sep 27, 2013 @ 23:58

        Hi -and thanks a lot.
        12 laptops running 12.04 lts edubuntu are now functioning for the students. I skipped Xine:
        $ sudo apt-get install vlc libdvdread4
        sudo /usr/share/doc/libdvdread4/install-css.sh

        finally I made VLC the preferred choice.

  • 🐧 nixCraft Dec 19, 2006 @ 12:16


    Thanks for heads up!

  • Kaithy Aravind Reddy Mar 13, 2007 @ 11:58


    got reply

    command not found

    try to search “install-css.sh” not found any where?

    Pls help.
    Kaithy Aravind Reddy

    • Amaya Sep 4, 2011 @ 22:12

      That would be because install-css.sh (in libdvdread4, at least) is not in /usr/share/doc/libdvdread4/examples/, but in /usr/share/doc/libdvdread4/. I haven’t tried with libdvdread3, but I would quietly guess it’s the same problem.

  • rocky Mar 16, 2007 @ 8:40


    Install lib libdvdread3
    sudo apt-get install libdvd3

  • Ron Sep 19, 2007 @ 2:42

    don’t you mean sudo apt-get install libdvdread3 or is this something different

  • 🐧 nixCraft Sep 19, 2007 @ 9:30


    Thanks for the heads up. The FAQ has been updated.

  • Ram Sep 19, 2007 @ 18:18

    Hi, very helful post, then if you can put a link in the “Please read this my article which explains why linux don’t support MP3 and DVD out of box” – that would be more helpful to the users to locate the articles.

    Thanks a lot!

  • 🐧 nixCraft Sep 20, 2007 @ 5:23


    The faq has been updated as per your request. I appreciate your feedback.

  • johnc Oct 1, 2007 @ 6:54

    in feisty use this command
    sudo /usr/share/doc/libdvdread3/install-css.sh

  • tom Nov 12, 2007 @ 1:48

    in gutsy as in feisty
    (i.e. no example folder)

  • Dave Jarvis Nov 13, 2007 @ 3:33

    Replace “xine” with “xine-ui” for more luck under Gutsy.

  • john horton Dec 18, 2007 @ 14:33

    This how-to worked for me. I did not have an example folder. But reading down the page I found the example and everything seemed to work out just fine. Now to play a dvd!

  • Chris G Feb 10, 2008 @ 16:40

    Ran “sudo apt-get install vlc xine-ui mplayer”

    Then, “sudo /usr/share/doc/libdvdread3/install-css.sh”

    Worked like a charm! Watching Hercules in New York right now with VLC Media Player.

  • S. Holzel Feb 25, 2008 @ 17:09

    Thank you! Now I can watch [i]all[/i] my dvd’s, and not just the, erm, backups. Just installed the libdvdread and the css, and VLC plays them quite nicely. Totem still doesn’t, however. Is that normal?

  • matt Mar 3, 2008 @ 1:41

    Ran “sudo apt-get install vlc xine-ui mplayer”

    Then, “sudo /usr/share/doc/libdvdread3/install-css.sh”

    worked perfect

  • gonio5 May 16, 2008 @ 20:05

    Thanks a lot for the help i m still a n00b, i get to see Simpsons right now, cheers =)

  • aubz May 26, 2008 @ 22:00

    hello everyone… i only resonantly got Linux and i get allot of it apart from this. were do write the command (if its in the terminal they don’t work at all for me) so please could someone help me out =]

  • Grams79 Nov 2, 2008 @ 17:24

    It does not work for 64-bit users on Ubuntu 8.10 final.
    I’ve been on every website on the internet for two days searching for a solution.
    At this point I can start a DVD movie and see the FBI warnings and menu just fine.
    But when the movie starts it becomes total junk to view on VLC.
    On Mplayer-Xine and others I receive a notice “Are you trying to play an encrypted DVD without libdvdcss?”.
    After installing over 100mb of suggested “solutions” I’m only thus far.
    The only one I can not get is xine extra plugins, since there is no support for amd64.

    Justin Grams

  • jose Dec 5, 2008 @ 6:57

    Works fine :D ty for the help

    with no example folder :D didnt read the all topic and wasted many time to figure out what happened :D

  • jeff reisch Feb 1, 2009 @ 12:56

    worked like a charm.

    thank you very much

  • plain_ubuntu_user Mar 14, 2009 @ 17:18

    YAY thank you…even an ignorant user only like me understood that!

  • Yashwant Apr 11, 2009 @ 17:40

    Didn’t help in Ubuntu 8.10 :(

  • Joy May 22, 2009 @ 9:18

    How can I do it in Ubuntu 8.04 (Hardy Heron) I’m having problem playing all my DVD’s also. Thanks

  • Saeid Zebardast May 24, 2009 @ 16:59

    in jauny (Ubuntu 9.04):
    sudo /usr/share/doc/libdvdread4/install-css.sh


    • sd442 Nov 6, 2010 @ 5:27

      I’m using Ubuntu Release 10.4 (lucid) Xubuntu
      this worked for me, after trying maaany others. Thanks Saeid!
      sudo /usr/share/doc/libdvdread4/install-css.sh

  • saidar Jun 1, 2009 @ 19:38

    worked great, thanks

  • Vivek Jun 5, 2009 @ 15:45

    Thanks Saeid for the Ubuntu 9.04 tip but VLC is still unable to decrypt the entire DVD

  • 163 Jun 9, 2009 @ 11:59

    For Ubantu 8.10
    sudo /usr/share/doc/libdvdread3/install-css.sh

  • Robert Reich Jun 13, 2009 @ 16:44

    aubz wrote:
    aubz 05.26.08 at 10:00 pm

    hello everyone… i only resonantly got Linux and i get allot of it apart from this. were do write the command (if its in the terminal they don’t work at all for me) so please could someone help me out =]

    Can anybody make any sense of it? It might be mangled English if it was English….

    Next, not even Windows is this absurd in playing mp3s. These are music files, for crying out loud, not classified Pentagon documents.

    The steps to install any kind of player are absurd. Can’t the Linux community come up with an installer?

  • Danny in California Ubuntu Newbie Sep 1, 2009 @ 17:15

    Saeid Zebardast : You did it! I am watching DVD’s on AMD 64 with 64 bit Ubuntu!!!!
    Many threads need updating to tell people to update library from libdvd3 to libdvd4, that is causing the command not found report in terminal on 64 bit version. Many thanks!

  • pc wiz new 2 linux Sep 26, 2009 @ 6:28

    Thanks Saeid and Chris G a line from both of you got me going no problems I’m runing fresh install of ubuntu9.04 with updates and edubuntu addon. nice feedback everyone
    1. sudo apt-get install vlc xine-ui mplayer
    2. sudo /usr/share/doc/libdvdread4/install-css.sh

  • Jody B Oct 2, 2009 @ 4:18

    Thanks for the help. I’m running jaunty 9.04 and this worked great

  • Bruno Oct 31, 2009 @ 1:41

    Doesn’t seem to work for Ubuntu 9.10

  • Jeff Nov 6, 2009 @ 11:45

    I have tried for hours without luck to install the css library using vlc ver 4.3.2 for ununtu. What am I doing wrong? I’m running Ubuntu 8.10 Intrepid

  • Gaea Nov 14, 2009 @ 3:20

    For all those who didn’t understand. Let’s start.
    1.- Find the install-css.sh (you can use the Search button at the top of the Nautilus (explorer) window).
    Usually is in usr/share/doc/libdvdread3 but if you already installed the kaffeine you can also find it in usr/share/doc/kaffeine.

    2.- Open an konsole window and type in sudo -i and type your password

    3.- Get one of the directory above mentioned

    4.- When you are in usr/share/doc/kaffeine or the other one type in sh ./install-css.sh

    5.- Wait a few seconds and … enjoy your Dvd’s

  • Gaea Nov 14, 2009 @ 3:43

    I forgot to mention that maybe some people need to install the VLC media player and try it with a movie after you install the CSS library . If it works then you can use any other program such as kaffeine, movie player, etc.

  • Jeff Nov 14, 2009 @ 7:14

    I have VLC installed .o.k. but the css library command is not working for me. This is what I keep getting:
    command not found
    sudo apt-get install vlc xine mplayer libdvdread3
    Reading package lists…Done
    vlc is already the newest version.
    Package xine is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or is only available from another
    E: Package xine has no installation candidate
    root @jeffrey-laptop:~# sudo /usr/share/doc/libdvdread3/examples/install-css.sh
    command not found

    I can’t seem to get the css installed, and cannot play DVD’s in VLC.
    Can someone help.

  • Gaea Nov 16, 2009 @ 17:12

    OK Jeff. I will suppose that you are a newbie on linux (me too but I know this one) so…
    Using the same command you use (sudo apt-get install vlc xine mplayer libdvdread3) I get the same message you got so… Did you try to install kaffeine? It includes the CSS library too but if you didn’t it’s OK.
    Now, as I said before, get into usr/share/doc/libdvdread3 and there you will find the “install-css.sh”.
    In other words type sudo /usr/share/doc/libdvdread3/install-css.sh and that’s all

  • Jeff Nov 17, 2009 @ 4:57

    Gaea and everyone – hey thanks! I am now watching copy protected dvd-‘s!! I do not know why this was not working before, but it is now. For anyone interested, I am running ubuntu 8.10 (intrepid), booting from a USB flash drive, and this puppy is now humming ;-)

  • Sean Nov 23, 2009 @ 0:03

    I am running 9.10 and sudo /usr/share/doc/libdvdread3/install-css.sh does not work. I have Kaffiene and VLC installed but when I try to play the DVD, nothing happens at all.

    Please help. Email me at seanmalhotra@gmail.com

  • Jeff Nov 23, 2009 @ 5:14

    Is there a way to copy and/or make a backup copy of an OS I have installed to, and which runs from a USB flash drive? I have UBUNTU (Intrepid) on an 8GB micro chip which I boot to. When I try to copy it in Windows, ,it sees the chip as blank and needing formatting. I want to copy this OS to a 16GB Flash so that I can install and run more applications but there doesn’t seem to be a way.
    Does anybody have any ideas?

  • Gaea Nov 25, 2009 @ 18:12

    Hey Sean! What did you get after you type sudo /usr/share/doc/libdvdread3/install-css.sh and/or sudo usr/share/doc/kaffeine/install-css.sh ??

  • Gaea Nov 25, 2009 @ 18:59

    Hey Jeff!! I think you want to clone your Linux so… check this out: http://www.linuxquestions.org/questions/linux-newbie-8/clone-linux-bootable-usb-flash-drive-670342/
    It may help you.

  • Anand Kasi Dec 3, 2009 @ 5:33

    On my Ubuntu 9.10, I have VLC, MPlayer, SMPlayer installed but won’t play encrypted dvd’s.
    sudo /usr/share/doc/libdvdread3/install-css.sh does not work……..

  • Jeff Dec 3, 2009 @ 6:52

    I don’t understand the problems you all are having. In 9.10 I installed VLC with the new
    UBUNTU SOFTWARE CENTER, and it plays everything beautifully. 9.10 is chock full of many other problems, however. Further, with the new 9.10, I believe the intent is to move away from the apt get stuff. Hope this helps.

  • michael Dec 4, 2009 @ 19:38

    updated from 9.04 to 9.10 now mplayer wiil not play encryped dvd’s

  • Jeff Dec 5, 2009 @ 4:10

    Michael…..I had luck with VLC which I installed via the new UBUNTU SOFTWARE CENTER. I never got Mplayer to work either with encrypted DVD’s, however.

  • Michael Dec 5, 2009 @ 13:20

    I have up dated ,loaded librays,and vlc player,nothing works, for encryted dvd’s

  • Jeff Dec 5, 2009 @ 19:58

    Where is GAEA? He seems to know how to fix everything ;-) I really don’t understand this because VLC has it’s own codecs which play encrypted DVD’s. I have done several new installs of 9.10 and VLC installs/plays like a champ (via the new UBUNTU SOFTWARE CENTER). Why don’t you post what configuration you are running here for other members, then perhaps GAEA or someone will have the answer.

  • Purpletoiletfish Dec 20, 2009 @ 8:03

    Ummm, why havnt any of you so called linux users ever thought to use “yum apt-get install “your install” that seems to work. good old yum command.

  • Gaea Jan 4, 2010 @ 4:30

    Hey!! What’s up? ^_^
    OK Anand Kasi. First of all, the command sudo /usr/share/doc/libdvdread3/install-css.sh change to sudo /usr/share/doc/libdvdread4/install-css.sh . It should work.

    And Michael….. did you ever play dvds before the update to 9.10?
    do vlc works with “normal” videos (avi, mpeg)?
    what graphic card do you have?

  • Gaea Jan 4, 2010 @ 5:48

    By the way! I usually use the Add/Remove application to install my software. But sometimes I also like to use Synaptic Package Manager. apt-get also works but if you are not good at command lines, I recommend Synaptic Package Manager.
    And as I said before, if you can’t find the css library, try installing kaffeine.

  • Tom May 2, 2010 @ 17:14

    I pasted in the fiirst command and it says that the command is not found -Help?

  • Josh May 29, 2010 @ 2:00

    The second command should read as follows:

    $ sudo /usr/share/doc/libdvdread4/install-css.sh

  • Creego Jul 22, 2010 @ 20:01

    actually got this to work, very nice

  • Z Aug 8, 2010 @ 4:20

    I’d like to thank y’all, for showing me how to get my videos to play :)

  • John Oct 9, 2010 @ 1:00

    Sweet! Two commands and now, I’m able to play my movies! Thanks a whole bunch, it is much appreciated!
    (Dell latitude CPX, 500 MHZ, 512 MB RAM, Ubuntu 10.04)

  • izzotheschizo Jan 12, 2011 @ 15:31

    Okay, I copy and pasted the command in the terminal and I changed the 3 to a 4. I dont know why you cant just run this from the file manager? I dont know why this doesnt automaticaly get installed when you install a player. okay in VLC it works sort of, I had to use the navigation menu, but it works. I have ubuntu 10.10 64 and this was the first time I used the terminal.

  • marie Jun 18, 2011 @ 8:32


    Worked with me too:

    “sudo apt-get install libdvdread4

    Then open a terminal window and execute:

    sudo /usr/share/doc/libdvdread4/install-css.sh

    Rebooting may be necessary.”

    Thanks very much!

  • Mark E Jul 22, 2011 @ 11:46

    Strange that it doesn’t work by default, since ubuntu-restricted-extras is installed.

    But hey, never mind, I can watch a DVD now so I’m happy.

    Thanks for the tip ! (although on Ubuntu 10.04 the package is libdvdread4, not 3)

  • Clint Jul 19, 2012 @ 1:55

    Um what? lol just got into linux

  • skye Jul 19, 2012 @ 2:38

    pmcartney worked for me thank you so much, time to watch my dane cook i have on dvd:)
    pmcartney said:
    Ubuntu 10.04 (i386, amd64), 10.10 and 11.04 (i386, amd64)

    Works for old releases that are no longer supported if you have repositories on Cd/Dvd or somewhere. So, anything from 9.04 onwards. The latest LTS, 10.04, and the radically different 11.04 also work this way.

    Install the libdvdread4 package (no need to add third party repositories) via Synaptic or command line:

    sudo apt-get install libdvdread4

    Then open a terminal window and execute:

    sudo /usr/share/doc/libdvdread4/install-css.sh

    Rebooting may be necessary.

  • Bob Feb 16, 2013 @ 17:34

    thank you! this works a treat in 12.04.

  • Italo Oct 26, 2013 @ 2:38

    Thanks, it worked to me!

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum