Skip to content

Instantly share code, notes, and snippets.

@siumhossain
Last active September 16, 2023 07:35
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save siumhossain/1aa24622d8fda5053581c87ca6457638 to your computer and use it in GitHub Desktop.
Save siumhossain/1aa24622d8fda5053581c87ca6457638 to your computer and use it in GitHub Desktop.
How to install selenium chrome web driver in linux

Download chrome webdriver from

Click here for download

Make sure driver version match your chrome browser version

Open folder where chrome driver downloaded and open terminal & run one by one

sudo chmod +x chromedriver
sudo mv chromedriver /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
chromedriver --version

If output looks like something 👇🏻

ChromeDriver 91.0.4472.19 (1bf021f248676a0b2ab3ee0561d83a59e424c23e-refs/branch-heads/4472@{#288})

Its ready to go

Open any py file where you write program

from selenium import webdriver

Please make sure you install selenium

pip3 install selenium
driver_location = '/usr/bin/chromedriver'
binary_location = '/usr/bin/google-chrome'

options = webdriver.ChromeOptions()
options.binary_location = binary_location

driver = webdriver.Chrome(executable_path=driver_location,options=options)
driver.get("https://www.youtube.com/watch?v=67h3IT2lm40")

Run this py file

🌟 Voila its work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment