Problem
How to install Okular Pdf Viewer
on Ubuntu and any Debian-based distro
Pre steps
Check your operating system;
Check if your operating system is Debian-based.
Check your OS
lsb_release
The command "lsb_release -a" is used to display information about the Linux Standard Base (LSB) and distribution-specific information of your Linux system.
The "lsb_release" command is useful for identifying the distribution and its version in a standardized manner, particularly if you are writing scripts or need to retrieve distribution information programmatically.
In the terminal
lsb_release -a
The output should be something like this
No LSB modules are available.
Distributor ID: Deepin
Description: Deepin 20.7.1
Release: 20.7.1
Codename: apricot
os-release
The command "cat /etc/os-release" is used to display the contents of the "/etc/os-release" file, which contains information about the operating system distribution.
The "/etc/os-release" file is commonly used by various system utilities and scripts to determine the distribution and retrieve specific information about the operating system.
In the terminal
cat /etc/os-release
Your output should be something like this
PRETTY_NAME="Deepin 20.7.1"
NAME="Deepin"
VERSION_ID="20.7.1"
VERSION="20.7.1"
VERSION_CODENAME="apricot"
ID=Deepin
HOME_URL="https://www.deepin.org/"
BUG_REPORT_URL="https://bbs.deepin.org/"
Debian-based distro
In the terminal
cat /etc/debian_version
Output
Steps
Install via apt;
Confirm installation;
Run it.
Install via apt
In Linux, apt
(short for Advanced Package Tool) is a command-line package management system commonly used in Debian-based distributions, such as Ubuntu.
It provides a convenient and simplified way to install, upgrade, and remove software packages from the command line, making it an essential tool for system administration and software management.
In the terminal
sudo apt install okular
Initial output
Confirm installation via which
The "which" command in Linux is used to locate the executable file associated with a given command or program. It helps you determine the path to the binary file that will be executed when you run a particular command.
When you run the "which" command followed by the name of a command, it searches the directories listed in the "PATH" environment variable to find the corresponding executable file.
In the terminal
which okular
output
/usr/bin/okular
Confirm installation via dpkg
The "dpkg -s" command is useful for checking the status of a specific package, verifying its installation, and retrieving detailed information about it, including its version and description.
dpkg -s okular
Initial output
Package: okular
Status: install ok installed
Priority: optional
Section: graphics
Installed-Size: 13132
Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Architecture: amd64
Version: 4:17.12.2-2.2+rb1
Run
okular & disown
output
"okular" is the command to launch the Okular document viewer application.
The "&" symbol at the end of the command tells the shell to run Okular in the background, allowing you to continue using the terminal.
"disown" is used to detach the Okular process from the terminal session. This prevents the process from being terminated when you close the terminal.
After running this command, Okular should launch in the background, and you can continue using the terminal for other commands without Okular's output or messages interfering.
Be happy
You got here. Way to go!
Let's connect
Final thoughts
I hope this article helped you. Let me know if you have any questions. Your thoughts, suggestions and corrections are more than welcome. By the way, feel free to drop your suggestions on new blog articles.
Hope to see you next time.