How to install Xvfb on Ubuntu
Last Updated :
23 Jul, 2025
The Linux/Unix operating system is designed for use with the X virtual frame buffer, often known as Xvfb. By attaching an input device, you can run graphical applications without a monitor. The software can operate headlessly and execute graphic operations in virtual memory. It was created specifically for Linux systems, and in this tutorial, we'll go through how to install and use it on Ubuntu (Linux OS).
Installation of Xvfb on Ubuntu
Follow the below steps for installing Xvfb on Ubuntu:
Step 1: Firstly, update the repositories using the apt manager. Execute the below command to update.
sudo apt update

Step 2: Install the Xvfb Tool using apt manager. Execute the command to install the Tool.
sudo apt install xvfb

Step 3: Enter 'Y' for confirming the installation.
Enter Y

Step 4: Now, install the firefox browser using the below command, as it is the prerequisite for the tool.
sudo apt-get install firefox

Step 5: Run the command shown below to verify the status of the xvfb process to see if it is installed and functioning properly.
ps -ef | grep xvfb | grep -v grep
When you type 'ps -ef'
, it lists all the processes running on your system. The 'grep xvfb
'
part filters this list to only show lines containing "xvfb".

Step 6: You can run browsers and tests in the background using Xvfb while hiding their execution. Use the following syntax when testing or running headless programs. As an example, the command below will open Firefox using xvfb in the background without displaying anything on the screen.
xvfb-run firefox HTTP://geeksforgeeks.org

Step 7: Use the help command with this command to learn more about it, and run the following command to learn more about how to use it.
xvfb-run --help

Conclusion:
Xvfb, or X virtual framebuffer, enables you to execute programs headlessly in the background without displaying actual processing. Running tests without opening an unnecessary window is helpful. In this article, We describe how to install and test xvfb on Ubuntu (Linux OS), as well as how it functions once it has been installed.
Similar Reads
How to install WebStorm on Ubuntu? WebStorm is a powerful and intelligent integrated development environment (IDE) designed by JetBrains specifically for modern JavaScript development. It supports various technologies and frameworks including NodeJS, ReactJS, VueJS, and many more, making it a favourite among developers. Whether you a
3 min read
How to install make on Ubuntu The "make" program in Linux is used to compile and manage a set of source code applications and files. It allows developers to install and gather a range of apps via the terminal. It also controls and cuts down on the amount of time necessary for compilation. The basic objective of the make command
3 min read
How to Install VidCutter on Ubuntu? VidCutter is a free, open-source video editor for Linux systems. It is designed to be lightweight and easy to use, making it a great option for users who want to quickly and easily edit their videos. To provide you with just what you require for cutting, program developers, in keeping with the name
4 min read
How to install Rider on Ubuntu? Are you looking to install Rider on your Ubuntu system? Rider, the powerful IDE from JetBrains, is a popular choice for .NET developers seeking a robust development environment on Linux. In this guide, we will provide you with a step-by-step tutorial on how to install Rider on Ubuntu. Whether you ar
3 min read
How to Install Caffe on Ubuntu? Caffe is a famous open-source deep learning framework developed and maintained by Berkley AI Research (BAIR). It's extremely flexible, modular, and quick. On Github, there is a wealth of open-source documentation for Caffer. It's commonly utilised in university research projects, proofs-of-concept f
1 min read
How to install Elinks on Ubuntu? If you are searching for any Text-Based Web Browser for any Linux Distribution like Ubuntu, then the Elinks on Ubuntu will be the best to use. The Elinks Web Browser on Ubuntu can even enhance the Command Line Experience. Not only on Ubuntu OS but the Installation of Elinks can be done on Windows OS
3 min read