How to: Linux Play DivX .avi video codec file

From my mail bag:

I’ve downloaded .avi files which is compressed into small sizes while maintaining relatively high visual quality using DivX format. How do I play DivX compressed files under Debian / Ubuntu Linux?

The current version of the DivX Community Codec for the Windows platform is version 6.6, and for Mac OS X is 6.6x. There is no Linux version available however with the help of VLC and DivX for Linux codec, you should able to play all sort of DivX files.

Download and Install DivX Linux Codec

Open terminal and type the following command to download DivX codec:
$ cd /tmp
$ wget

Untar DivX 6.1.1 codec for Linux:
$ tar -zxvf divx611-20060201-gcc4.0.1.tar.gz
Install divx611 codec:
$ cd divx611-20060201-gcc4.0.1
$ sudo ./

Press Q after reading agreement, please type yes to install codes.

Install vlc player

The VLC media player can be installed using apt-get command, type:
$ sudo apt-get update
$ sudo apt-get install vlc

How do I play files?

Open VLC player by Visiting Applications > Sound and Video > VLC Player. You can also open terminal and type the command:
$ vlc /path/to/my-downloaded-movie.avi

Further readings:

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

🐧 36 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
36 comments… add one
  • Kartik Nov 23, 2007 @ 16:33

    I tried the above procedure mentioned. But after i did ” sudo ./ ” , it asked me to enter a password.

    I’m even unable to extract the files because it is password protected. How do I resolve this to install divx codecs on my linux ??

  • 🐧 nixCraft Nov 23, 2007 @ 20:48

    Enter your own password

  • Joshua Dec 21, 2007 @ 0:46

    thankyou sooo much for the instructions on installing the divx codec… worked only thing is…i still cant figure out how to watch a streaming movie even with the codec….the further instructions and after installing vlc…i even removed mplayer…for example on a site such as…..the website still tells me that i’m missing the codec…even though i have installed it and i even tried reinstalling it just in case.but it says its installed…can anyone help…im out of ideas…

  • karl Jan 31, 2008 @ 22:21

    Installing vlc does not work. I’m using kubuntu.

  • cloversg Feb 3, 2008 @ 3:33

    You don’t need to install any codecs.
    VLC Media player does the job without any assistance. You will only have problems with .asf, .wmv and .rm (Proprietary media formats)

    It works both for Linux as well as Windows

    Go read the home page.

  • blink4blog Feb 3, 2008 @ 16:17

    Well, after installed the codec, the existing VLC 0.9 beta still could not open those DIVX video, any ideas?

    I found nothing been left after the installation inside /tmp

    How to incorporate the codec to work with VLC?

  • miis Apr 15, 2008 @ 9:54

    I installed vlc
    sudo apt-get install vlc

    but opening avi files plays only voice !! not video

  • yusuf khan Jun 8, 2008 @ 5:32

    Thanks for the support i have got the Divx installed.

  • Shawn Jun 8, 2008 @ 20:24

    As mentioned above; VLC uses it’s own codecs; installing the DivX codec pack will not make it play in VLC.

    I’m at a loss as to any tool that actually uses the “official” DivX library.

  • vikendra Jun 14, 2008 @ 8:28

    i want to know about the all steps to runing the vedio in linux

  • Aadam Jun 23, 2008 @ 0:03

    i types my own password but it didnt work, by own pass word what do you mean, if you mean the password to log onto the computer, it doesnt work, so please tell me what password to type

  • brian Jun 23, 2008 @ 19:08

    brian@brian:/tmp/divx611-20060201-gcc4.0.1$ $ sudo ./
    bash: $: command not found

    um.. how can i fix this because i followed all directions up to here — it is hopefully apparent to you all that i am stuck.

    any help would be of great use to me.
    thanks, brian

  • stupidsavior Jul 2, 2008 @ 21:31

    sudo needs root password. If your guys are so dumb why are you using Linux in the first place? Stick to StupidSoft.

    • jamble May 15, 2011 @ 7:29

      Err..sudo does not take the root password.

      • Zach May 16, 2011 @ 16:24

        sudo gives a regular user account super/root rights. You put sudo in the front of your command when it requires you to read or write system files that you’re regular account is not a owner/group member of.

  • Zach Aug 8, 2008 @ 23:35

    I ran through the steps without a problem. Except I am trying to us VLC as my streaming video client for play divx videos through firefox. How can I set that up?

  • Ray Nov 16, 2008 @ 16:20

    i did all the steps..but vlc’s only got sound and no video…did i do something wrong? i got confirmation that divx installed properly but no go =( help!

  • FredAgu Dec 13, 2008 @ 13:41

    Me too have the password problem as karthik and Adam
    I think contents.dat is separately password protected.

    Brian pls chk ur help files to know correct usage of ‘sudo’ command
    { sudo **ur extracted file path**/}
    to goto root type sodo -i at terminal and follow the steps above

  • sami Dec 14, 2008 @ 13:20

    sudo not working….
    cannot find command

  • RTH Dec 30, 2008 @ 15:58

    In order to use sudo you must have an entry in /etc/sudoers file.
    Usually in the following format:
    username ALL=(ALL) ALL

    When using sudo command you will need to provide your own username password.

    If sudo has not been setup you need to become a root user (just type: su and provide root password) and then add the following line into /etc/sudoers file. After that sudo should work.

  • jimmyjiggle Feb 25, 2009 @ 9:05

    man sudo
    vi /etc/sudoers
    if you can’t figure that out use windows

  • daemonas Feb 27, 2009 @ 9:24

    m8 suppose you’ve born with linux pre installed inside your brain…
    give a chance to 0thers jump into Linux, is what Linux forums standing for.
    If you do not want to be helpful, maybe windows is a better place for u.
    After all there has not to be any answer , simply cause everything is locked 😉

  • fakesmeksidi Mar 28, 2009 @ 18:00

    if sudo doesn’t work try sudo’s for ubuntu and some other versions. it will ask you your password and after you submit it it will change u to superuser. after you do whatever u want enter exit to became a regular user again.

  • Rocky Mar 31, 2009 @ 11:43

    I installed was able to run the installation file for divx code on fedora 10 but i open some sort of agreement text and didnt move further could anyone guide me what to do next.

  • Mark Bellis Apr 7, 2009 @ 21:14

    Rocky – “Press Q after reading agreement, please type yes to install codes.”
    Thanks – this works on the Aspire One’s Linux.

  • mandervain Aug 14, 2009 @ 23:12

    I’ve got also kubuntu and line : sudo apt-get vlc doesn’t works…
    what might be the problem and how to fix it?

  • unbuntu Sep 17, 2009 @ 1:32

    mandervian – use sudo apt-get install vlc

  • Punki Oct 11, 2009 @ 6:27

    during apt-get update i recieved the following error:

    pc000113:/tmp/divx611-20060201-gcc4.0.1 # apt-get update
    Ign update/11.1 repomd.xml
    Get:1 11.1/repo/oss/suse repomd.xml [951B]
    Fetched 951B in 0s (6395B/s)
    Err update/11.1/ primary.xml
      404 Not Found
    Err update/11.1/ filelists.xml
      404 Not Found
    Hit 11.1/repo/oss/suse/ primary.xml
    Hit 11.1/repo/oss/suse/ filelists.xml
    Failed to fetch  404 Not Found
    Failed to fetch  404 Not Found
    Reading Package Lists... Error!
    E: Dynamic MMap ran out of room
    E: Error occured while processing transmission-gtk (NewVersion1)
    E: Problem with MergeList /var/lib/apt/lists/ftp-1.gwdg.de_pub_opensuse_distribution_11.1_repo_oss_suse_repodata_primary.xml
    E: The package lists or status file could not be parsed or opened.


  • Peter Oct 23, 2009 @ 10:13

    I’m a Mac user who is just now venturing into Linux.
    I too was having a problem with the install.
    Pressing “Q” worked. Thank you!

    But how was a newbie supposed to know that I needed to press “Q”?
    That’s not very intuitive.


  • mossup Feb 6, 2010 @ 5:01

    I followed the instructions to the letter, divx is definitely installed but still cannot play files either on vlc, xine or gstreamer… annnnnnd vlc does not appear to have any codecs at all installed for use…weird…

  • piggygrunts Oct 6, 2010 @ 11:46

    Many thanks for your instructions for installing DIV X, they worked perfectly with Xubuntu and VLC Player.

  • Anshul Feb 21, 2011 @ 13:27

    How to play mp3, .avi, .3gp, .mpeg, .dob, and .flv files in ubuntu and fedora.
    How to install other software like vlc player, powr dvd on ubuntu and fedora
    Please reply

  • assemov Apr 10, 2011 @ 4:51

    good morning every one !!!

    could any one plz tell me how to get direct download to vlc player then direct command to install it on suse linux with out problems so i can watch my flv,mpeg files..etc that are only working on windows …i do really appreciate your efforts

  • paolo guggia Jun 13, 2011 @ 17:03

    VNC install doesn’t work – when running ‘sudo apt-get vlc’ I get an error (E: Invalid operation vlc)

    • dc Jul 19, 2011 @ 20:27

      see unbuntu’s advice above:
      >> use sudo apt-get install vlc

  • Vinicius Pires Sep 1, 2012 @ 18:48


    Thanks for the tutorial…
    But instead of “sudo apt-get vlc” you should type “sudo apt-get install vlc”

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