How to Install Selenium Tools on Linux?
Last Updated :
23 Jul, 2025
Installing Selenium tools on Linux is a crucial step for developers and testers who want to automate web applications in a Linux environment. Selenium is a powerful tool that supports various programming languages and is widely used for browser automation. Setting up Selenium on Linux involves installing essential components like Java, WebDriver, and a browser driver compatible with your preferred browser (such as ChromeDriver for Google Chrome).
This guide will walk you through the process, ensuring a smooth setup for running Selenium tests on your Linux system
Installing Selenium Tools on Linux
To install Selenium Tools on Linux follow the following steps:
Step 1: Install Java. Java must be installed on your computer. Install Oracle Java 8 or OpenJDK with the command below.
sudo apt update
sudo apt install openjdk-11-jdk -y
Step 2: Install Google Chrome. Using the commands shown below, install the most recent Google Chrome package on your PC.
wget -N https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/google-chrome-stable_current_amd64.deb
sudo apt install -y /tmp/google-chrome-stable_current_amd64.deb
Step 3: Install Chrome Webdriver. You must also install ChromeDriver on your computer. It is a standalone server for Chromium that is used to implement WebDriver wire protocol. It is an open-source tool for testing web applications. So to check the version of Google Chrome installed on your system write the following command in the terminal.
google-chrome --version
Next, go to the ChromeDriver download page and download Chromedriver on your system.
Note: you can add the latest stable version of chrome in place of ${version}.
wget -N https://chromedriver.storage.googleapis.com/$%7Bversion%7D/chromedriver_linux64.zip -O /tmp/chromedriver_linux64.zip
Now execute the below commands to configure ChromeDriver on your system.
unzip /tmp/chromedriver_linux64.zip -d /tmp/chromedriver/
sudo cp /tmp/chromedriver/chromedriver /usr/local/bin/chromedriver
chromedriver -v
Step 4: Download Required JAR files. To use Remote Selenium WebDrivers, you'll need the Selenium Server. Use the following commands below to get the Selenium server jar file, or you can download the latest version from the official website.
wget https://release-assets.githubusercontent.com/github-production-release-asset/7613257/51db3dcc-ba59-4bd4-88c0-bcb919baea38?sp=r&sv=2018-11-09&sr=b&spr=https&se=2025-07-23T10%3A20%3A26Z&rscd=attachment%3B+filename%3Dselenium-server-4.11.0.jar&rsct=application%2Foctet-stream&skoid=96c2d410-5711-43a1-aedd-ab1947aa7ab0&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skt=2025-07-23T09%3A19%3A45Z&ske=2025-07-23T10%3A20%3A26Z&sks=b&skv=2018-11-09&sig=uNYzBptdmIkQrAi%2FJCqQzR6Bkqr7aaFbNiUoFUSSMYc%3D&jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmVsZWFzZS1hc3NldHMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwia2V5Ijoia2V5MSIsImV4cCI6MTc1MzI2MjkxOSwibmJmIjoxNzUzMjYyNjE5LCJwYXRoIjoicmVsZWFzZWFzc2V0cHJvZHVjdGlvbi5ibG9iLmNvcmUud2luZG93cy5uZXQifQ.DTC6iEZ8TKN443vBBrpJ3k-VN5HDLvhUf5WopqJ3FYk&response-content-disposition=attachment%3B%20filename%3Dselenium-server-4.11.0.jar&response-content-type=application%2Foctet-stream -O selenium-server.jar
Step 5: Start Chrome via Selenium Server. The server is set up and ready to go. Using the xvfb utility, we will start Chrome via the selenium server.
xvfb-run java -Dwebdriver.chrome.driver=/usr/bin/chromedriver -jar selenium-server.jar
You might need to first install xvfb which can be done using the following command.
sudo apt install xvfb -y
Now you are all set to use Selenium Tools.
Conclusion
By following the steps outlined in this guide, you will successfully install Selenium tools on Linux and be ready to start automating your web testing tasks. With Selenium properly configured, you'll have the flexibility to run automated tests in a robust and scalable Linux environment, ensuring your web applications perform as expected across different platforms. Make sure to keep your tools updated to take advantage of the latest features and security enhancements, optimizing your Selenium testing experience on Linux
Similar Reads
How to Install Spring Tool Suite on Linux? Spring Tool Suite, also known as STS an abbreviated version of Spring Tool Suite. In this article, we will discuss Installing the latest Spring Tool Suite on Linux. What is Spring Tool Suite?STS is a Java Integrated Development Environment specially designed for Spring-based enterprise applications
3 min read
How to Install Tor on Linux? Tor browser is a web browser that is designed and developed to protect your privacy online and is mostly famous among normal people as a key for safely accessing hidden or restricted online resources, including those on the dark web. We will see what Tor is and how to install it on your Linux machin
5 min read
How to Install Selenium on MacOS? In this article, we will learn how to install Selenium in Python on MacOS. Â The selenium package is used to automate web browser interaction from Python.InstallationMethod 1: Using pip to install SeleniumFollow the below steps to install the Selenium on macOS using pip:Step 1: Install the latest Pyt
1 min read
How To Install Maven On Linux? Maven is your software program development sidekick! Maven, crafted using the Apache Software Foundation, is the go-to device for simplifying the complex international of build automation and task management. It's designed to permit you to be conscious of coding while effortlessly managing obligatio
3 min read
How to Install PHP on Linux? PHP is a popular server-side scripting language that is especially used in web development. If you're working on a Linux environment, whether it's a personal development setup or a production server, you will likely need PHP installed. In this article, we will see the step-by-step guide to install P
2 min read
How to Install Selenium in Python? Selenium Scripts are built to do some tedious tasks that can be automated using headless web browsers. For example, Searching for some Questions on Different Search engines and storing results in a file by visiting each link. This task can take a long for a normal human being but with the help of se
4 min read