LinuxCommandLibrary

chromium

Launch the Chromium web browser

TLDR

Open a specific URL or file

$ chromium [https://example.com|path/to/file.html]
copy

Open in incognito mode
$ chromium --incognito [example.com]
copy

Open in a new window
$ chromium --new-window [example.com]
copy

Open in application mode (without toolbars, URL bar, buttons, etc.)
$ chromium --app=[https://example.com]
copy

Use a proxy server
$ chromium --proxy-server="[socks5://hostname:66]" [example.com]
copy

Open with a custom profile directory
$ chromium --user-data-dir=[path/to/directory]
copy

Open without CORS validation (useful to test an API)
$ chromium --user-data-dir=[path/to/directory] --disable-web-security
copy

Open with a DevTools window for each tab opened
$ chromium --auto-open-devtools-for-tabs
copy

SYNOPSIS

chromium [options] [URL]

PARAMETERS

URL
    Opens the specified URL in a new tab or window.

--incognito
    Launches the browser in incognito (private browsing) mode, not saving browsing history, cookies, or site data.

--headless
    Runs Chromium in headless mode, without a graphical user interface, primarily used for automated testing or server-side rendering.

--app=URL
    Opens the specified URL as a standalone web application, without browser UI elements like address bar or tabs.

--new-window
    Forces the specified URL to open in a new browser window, even if a running instance exists.

--new-tab
    Forces the specified URL to open in a new tab within an existing window.

--user-data-dir=path
    Specifies the directory where user profile data (history, bookmarks, settings) is stored. Useful for portable installations or multiple profiles.

--profile-directory=name
    Specifies the profile to use, relative to the user data directory. E.g., 'Profile 1'.

--disable-gpu
    Disables GPU hardware acceleration, which can sometimes resolve rendering issues or save resources.

--version
    Prints the Chromium version information and exits.

--help
    Shows a list of available command-line options.

DESCRIPTION

chromium is the open-source web browser project that forms the foundation for Google Chrome and many other browsers. On Linux, the chromium command typically launches the Chromium web browser, allowing users to browse the internet, access web applications, and develop web content. It provides a modern, standards-compliant rendering engine (Blink) and a powerful JavaScript engine (V8).

While sharing much of its codebase with Google Chrome, chromium generally lacks proprietary components such as built-in PDF viewer, Flash player, and certain media codecs that are licensed by Google for Chrome. It often receives updates more frequently and directly from the open-source project. Users can specify URLs as arguments to open them directly in the browser, or use various command-line options to control its behavior, such as opening in incognito mode, running in headless mode for scripting, or managing user profiles. It's a popular choice for those preferring an open-source browser experience while benefiting from the speed and modern capabilities of the underlying Chromium engine.

CAVEATS

chromium, especially without the `--no-sandbox` flag (which should be avoided for security reasons), can be resource-intensive, particularly with many tabs or complex web applications. Updates are managed by the respective Linux distribution's package manager, so the update cycle might differ from Google Chrome. Users may need to install additional packages for full media codec support or proprietary features sometimes found in Chrome.

DEFAULT BROWSER INTEGRATION

On many Linux systems, chromium can be set as the default web browser, allowing it to open URLs from other applications via tools like xdg-open.

DEVELOPMENT AND DEBUGGING

chromium offers extensive developer tools, accessible via the F12 key or Ctrl+Shift+I, for inspecting web pages, debugging JavaScript, and analyzing network activity. It's a powerful environment for web developers.

HISTORY

The Chromium project was launched by Google in 2008 as the open-source foundation for its Chrome browser. Its primary goal was to build a fast, secure, and stable web browser. The command-line utility for launching the browser has evolved alongside the project, maintaining compatibility with core web standards and introducing new features. Its development is community-driven and continuous, with frequent updates incorporating new web technologies and security patches, making it a living, evolving project that directly influences the web browsing experience for millions globally.

SEE ALSO

Copied to clipboard