Linux : How to run Google Chrome as root

By | January 5, 2020

By design, Google Chrome cannot be started as root on Linux systems for security reason, which totally make sense.

However, there might be some exceptions where it is required. Here is how to make it work.

If you need to run it once or really occasionally, you may start it with the following command using the terminal :

google-chrome --no-sandbox

If you need a more permanent solution, that will also work with the Google Chrome shortcut in the GUI, here is what you need to do :

1. Edit the following file :

/opt/google/chrome/google-chrome

2. Go to the end of the file and locate the following line :

exec -a "$0" "$HERE/chrome" "$@"

3. Append the following at the end of it :

--user-data-dir --test-type --no-sandbox

Example :

exec -a "$0" "$HERE/chrome" "$@"--user-data-dir --test-type --no-sandbox

4. Save the file and it should now be working.