How to Install VLC Media Player in Ubuntu 22.04
VLC is a renowned media player equipped with multi-codec support to play maximum media files. VLC offers cross-platform support which makes it a favorite media player for Ubuntu users. It offers audio, video, and synchronization effects to enhance/adjust the audio/video as per your requirement, i.e., boosted audio options, zoom-in/out video, angling the video, etc.
In this guide, we will enlist all the possible ways to get VLC on Ubuntu 22.04.
- How to Install VLC on Ubuntu 22.04
- How to Make VLC a Default Media Player on Ubuntu 22.04
- How to Completely Remove/Uninstall VLC From Ubuntu 22.04
- How to Update VLC on Ubuntu 22.04
- Bottom Line
How to Install VLC on Ubuntu 22.04
VLC is available through five different CLI and one GUI method. All of which are not updated yet trusted to get the package. Here’s the list of methods to be discussed further:
- Default Repositories
- Snap
- Flatpak/Flathub
- Source Binaries
- PPA
- GUI (Snap, Default Repositories, or Flathub)
Default Repositories
Ubuntu default/official repositories fetch the package from either of four repositories, i.e., main, universe, multiverse, or restricted. This is the most suitable method for Ubuntu users as the version is authentic and tested. Let’s do it:
Step 1: Update Core Libraries
To get the latest available version of VLC, update the core-libraries/packages index:
sudo apt update
Step 2: Install VLC
Now, install VLC via the command. It also installs the recommended/required dependencies:
sudo apt install vlc
Version 3.0.16 is installed using this method:
Snap
Snap Store offers an updated version of VLC and is supported on numerous Linux distributions. Let’s install VLC from snap:
Step 1: Install/Enable Snap
Install snap and its core utility to enable the snapd and build the dependencies:
sudo apt install snapd;sudo snap install core
Step 2: Install VLC
Install VLC using the command:
sudo snap install vlc
Updated than default repositories yet not the latest one.
Flatpak/Flathub
Flatpak manages the applications from the Fkathub repository. Flathub is an updated applications store for Linux-based systems. It also offers fully loaded VLC (than other methods) and here’s the process to install it on Ubuntu:
Step 1: Install Flatpak and Add Flathub Repo
First, you have to install the flatpak package:
sudo apt install flatpak
Enable/Add the flathub repo from where the flatpak packages are obtained:
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
Step 2: Install VLC
Now, use the flatpak command with flathub repo and the applications ID of VLC:
flatpak install flathub org.videolan.VLC
Check the version:
flatpak list | grep VLC
So, flatpak provides the latest VLC version.
Source Code
Source code binaries are available on the official website of VLC. These would always be updated as it is distributed instantly with each minor/major update. Here’s the process to get the source binaries:
Step 1: Download and Extract the tar.xz File
Visit VLC’s Latest Source Downloads and get the updated tar.xz file available. At the moment, 3.0.20 is the latest release available:
wget https://get.videolan.org/vlc/3.0.20/vlc-3.0.20.tar.xz
Step 2: Get the Dependencies and Configure the Source Code
Before configuring, get the following dependencies:
sudo apt install build-essential libavcodec-dev libavformat-dev libswscale-dev liba52-0.7.4-dev libasound2-dev lua5.2 liblua5.2-dev libxcb* libvlc*
Change the current directory to the extracted folder and configure/build the source code:
cd Extracted-Directory ./configure
The configure script ensures the availability of the required dependencies (such as the compiler).
Step 3: Compile the Source Code
Once dependencies are loaded, compile the source code:
make
Step 4: Install VLC
The VLC source binaries are ready to be executed for installation:
sudo make install
And here you get the latest VLC version (3.0.20):
PPA
PPA is the package archive repository for the updated and the to-be test applications/packages. VLC’s PPA is available to get stable and development releases.
Step 1: Add the PPA
Add one of the below PPA, one refers to the stable and the other to the development release:
sudo add-apt-repository ppa:videolan/stable-daily #For Stable Release sudo add-apt-repository ppa:videolan/master-daily #For Development Release
The “add-apt” updates the packages list as well. If not, do it yourself:
sudo apt update
Step 2: Install the VLC
sudo apt install vlc
If you check the version, it is 4.0.0 which is the development release:
GUI (Snap, Default Repositories, or Flathub)
Snap, default repositories, and flathub offer GUI support to install/manage most of the packages that are available through CLI. GUI is just a mirror of the VLC installed from the snap, default repositories, or flathub. Versions are the same as CLI but in a convenient way if you are a GUI lover.
Search for VLC in the Software Centre:
Choose the installation platform, i.e., snap, universe, or flathub:
If you scroll down, you will find the details about VLC, i.e., current version, and total size:
Click on Install and follow the onscreen instructions to get it installed:
Provide the user password:
Soon, VLC version 3.0.19 will be installed.
How to Make VLC a Default Media Player on Ubuntu 22.04
By default, when you open a media file, Ubuntu opens up in the default media player. You can change the default media player to VLC if you want to open each media file (Audio/Video) in VLC. Let’s make VLC the default audio/video player:
- Navigate to the Default Applications tab inside the Ubuntu Settings.
- Choose the VLC media player in the Music and Video options as highlighted below:
Now, all the audio/video files will be played with VLC automatically.
How to Completely Remove/Uninstall VLC From Ubuntu 22.04
You can use any of the removal method (as per your installation) to completely remove/uninstall VLC from Ubuntu 22.04:
For Apt-Based Installations (Default and PPA)
The apt-based installations refer to the default and PPA methods. Use the below command to completely remove VLC:
sudo apt autoremove vlc --purge
If you want to remove the PPA repository as well, you can remove it using one of the following commands (depends which PPA you have added):
sudo add-apt-repository --remove ppa:videolan/stable-daily sudo add-apt-repository --remove ppa:videolan/master-daily
For Snap-Based Installations
The snap-based VLC package can be removed using the command:
sudo snap remove vlc
For Flatpak/Flathub-Based Installations
Use the below command to remove the VLC installed via flatpak/flathub:
flatpak uninstall org.videolan.VLC
For Source-Based Installation
Navigate to the directory where you have configured the source code and use the below command to remove it:
sudo make uninstall
Important: For a version installed from GUI. You need to search for the package in the Ubuntu Software Centre and opt for the removal of the package.
How to Update VLC on Ubuntu 22.04
Want to get the updated release of already installed VLC? Don’t worry. Just dig into your respective installations section below and update the VLC:
Update an apt-based VLC
If you have installed VLC from the default repositories, then use the below commands sequentially to get the updated VLC:
sudo apt update sudo apt install --only-upgrade vlc
However, if you have installed VLC from PPA, you need to add the updated PPA to update the VLC. Follow the same installation method to do so: PPA-based installation of VLC.
Update a Snap-Based VLC
Here’s the command to update the VLC snap only:
sudo snap refresh vlc
Update the Flatpak/Flathub-Based VLC
Use the following flatpak command with its update flag and application ID of VLC:
flatpak update org.videolan.VLC
That’s how you can install, update, or remove VLC from Ubuntu.
Bottom Line
Majorly there are two categories for installing VLC on Ubuntu 22.04, i.e., CLI and GUI. The CLI-based installation methods include the default repositories, flatpak/flathub, snap, and PPA. Whereas the GUI-based installation is the mirror of the above installations (except PPA).
The latest stable version of VLC is 3.0.20 (at the time of writing) which is available through flatpak and source binaries. Whereas the latest development is available through PPA. So, choose the method as per your priority.