- How to open chrome from command line
- Open chrome from command line
- Run command for Chrome
- How to open Chrome as a different user
- Open a website in Chrome browser from command prompt
- Run command for Chrome to open a website
- Open chrome in incognito mode from command prompt
- Command to open chrome in incognito mode from CMD
- Command to open incognito mode from Run
- How to run Google Chrome in incognito mode from the command line or a shortcut
- About Sergey Tkachenko
- 2 thoughts on “ How to run Google Chrome in incognito mode from the command line or a shortcut ”
- How to use Chrome command line switches in Windows
- Control Chrome with command line flags
- 1 View app command lines
- 2 View Chrome command line
- 3 Create a desktop shortcut
- 4 Add a Chrome command line switch
- 5 Name it, save it
- More Chrome command line switches
- Set Chrome’s start size and position
- Turn websites into apps
- Browse in silence
- Continue browsing
- Increase privacy
- Enable Chrome dark mode
- Comment in the Forums
- Save money on apps/services
- Search this site
- CHAT, DISCUSS, LEAVE COMMENTS
- REMOVE THE ADS
How to open chrome from command line
Chrome browser supports opening from command line and run window. There are few command line switches as well that you can use to launch chrome incognito mode or with other features.
Open chrome from command line
Run below command to start chrome from CMD.
Run command for Chrome
Chrome can be opened from Run window by executing the command chrome .
Note that the run command is chrome whereas the CMD command is start chrome
However, you can make it work from CLI too by adding the chrome installation folder to the PATH environment variable. The installation path is «c:\Program Files (x86)\Google\Chrome\Application» . You can add this folder to the path by following the instructions from How to set path from command prompt
How to open Chrome as a different user
Use runas command to start chrome with the credentials of another user.
To start chrome as administrator of the system
Open a website in Chrome browser from command prompt
A website can be opened from command line by specifying the URL of the website.
Run command for Chrome to open a website
Run the command chrome websiteUrl to open a website in chrome.
Open chrome in incognito mode from command prompt
Chrome has command line switch to open with incognito mode. This is supported from command prompt and run command.
Command to open chrome in incognito mode from CMD
Command to open incognito mode from Run
When setting path via command via instructions:
setx path “%path%;c:\Program Files (x86)\Google\Chrome\Application”
I still cannot run “chrome” via CLI
(c:\>chrome)
what am I missing?
Even manually adding it via sysdm.cpl I cannot get it to run
You need to open a new command window after running ‘setx’ command. In the first command window, it still uses the previous value of path.
I want to open website in a new window rather than a new tab in existing chrome window. could not figure out how to do this. Any ideas?
How to run Google Chrome in incognito mode from the command line or a shortcut
Incognito mode is a feature of Google Chrome designed to not record the history of your web surfing. It is similar to the Private browsing mode in Firefox and Internet Explorer. When you open a new Incognito window, Chrome does not retain cookies, temporary internet files, history, and other data related to your browsing activities. When the Incognito mode session window is closed, this data is cleared. Incognito mode can be started via the sandwich menu button or using the keyboard by pressing Ctrl + Shift + N shortcut keys. However, you might want to run Chrome directly in incognito mode via a shortcut or command line. Here’s how to do it.
To run Google Chrome in Incognito mode, the browser supports a special command line switch, -incognito, which forces the browser to start with the Incognito window opened instead of the regular browsing session.
The command line must be like this:
Note the hyphen before ‘incognito’. You can type the above command directly in the Run dialog (press Win + R shortcut keys on the keyboard and press Enter after typing it).
It will work even if you don’t enter the full path to chrome.exe because, like other browsers, Google Chrome adds a special run alias to run the browser directly.
You can create a shortcut to this command and also assign a global hotkey for this shortcut to open Incognito mode directly, as described in this article: Add global hotkeys to launch your favorite applications in Windows 8.1.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
Share this post
About Sergey Tkachenko
Sergey Tkachenko is a software developer from Russia who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.
2 thoughts on “ How to run Google Chrome in incognito mode from the command line or a shortcut ”
thanks! i need that so i don’t need to cleanup the history cache and cookies! i love you!
How to use Chrome command line switches in Windows
Control Chrome with command line flags
If you use Chrome browser on a Windows PC, customize the browser’s startup using little known command line flags or switches that enable or disable features, or access certain features.
Chrome can simply be started by clicking the icon in the taskbar, on the desktop, or in an Explorer window. It can also be started from the Start menu. However, all these different ways of starting it result in the same action and the default Chrome application window appears.
There are other ways of starting Chrome and you might want to start with an incognito window for example. Normally, you would have to start Chrome, open the menu, then select New incognito window. However, starting up with an incognito window by default saves time and effort.
This is possible using a command line switch or flag. One way to use command line switches is to open a command prompt window and changed to the folder on the disk containing Chrome. It could then be started by entering:
chrome.exe
If you wanted to start Chrome in incognito mode, you would enter:
chrome.exe –incognito
That –incognito (space and then two dashes incognito) is the command line switch and it tells Chrome how to start. There are dozens of command line switches for Chrome, but many are not useful, at least to the average Chrome user just wanting to browse the web. A lot of command line switches are useful only to programmers and developers.
Here, I just want to focus on the handful of most useful command line switches, ones you might actually want to use. However, before looking at them, let’s see a worked example of how to use one. Not from the command prompt, but from a custom desktop icon that can be used to start Chrome browser.
1 View app command lines
We need to know where Chrome is located on the disk drive and we could search for it in Explorer, but there is a simple method. Right click an empty part of the taskbar and select Task Manager on the menu that is displayed.
Select the Processes tab and if you do not see a Command line column, right click any column header and select it from the list.
2 View Chrome command line
Start Chrome and it appears on the Processes tab in Task Manager. Click the little arrow next to Chrome to expand all the entries and you can then see the command line or location of the chrome.exe file.
3 Create a desktop shortcut
Now that we know Chrome’s location, right click the desktop and select New, Shortcut. In the window that appears, click the Browse button and then find and select chrome.exe. You know where it is from Task Manager.
4 Add a Chrome command line switch
Click in the box, type a space and then the switch you want to use with this shortcut. For example, you could add –incognito to start the browser in incognito mode (space dash dash incognito).
5 Name it, save it
All that remains is to click the Next button and give the desktop shortcut a descriptive name. In this case, Chrome Incognito will do.
We now have a desktop icon that starts Chrome with a command line switch.
More Chrome command line switches
Create more desktop shortcuts and add the following command line switches in the same way. Save each one with a descriptive name. You could have half a dozen desktop icons to start Chrome in different ways.
Set Chrome’s start size and position
If you want to start Chrome full screen regardless of what size and position it previously had, use the following command line switch:
–start-maximized
Chrome remembers the size and position of its window and the next time the browser is started, it openes in the same position and at the same window size. This is often useful, but not always and sometimes you might want to start Chrome with a certain size and place on the screen. Create a shortcut and add this command line switch:
–window-position=500,100 –window-size=800,600
The first part, –window-position, sets the position of the top left corner of the browser window and the second part, –window-size, determines the size of the window. Just remember that 0,0 is the top left corner of the screen, so 500,100 is 500 pixels across and 100 pixels down.
Turn websites into apps
A web browser has an address box with the website or page URL, toolbar buttons, scrollbars and other items. All this interface clutter can be removed and websites can be used in a cleaner and simpler window.
It makes websites look and work like apps. It does not suit all websites, so you will not want to use this all the time, but for a few, it is very useful. Create shortcuts with the following command line switches. There are more sites and these are just a few examples:
–app=”https://mail.google.com”
–app=”https://keep.google.com”
–app=”https://onedrive.live.com/”
–app=”https://outlook.live.com/”
Some command line switches can be combined, so we could add the position and size switches to these commands. For example, here is how to start Google Keep in a window like an app:
–app=”https://keep.google.com” –window-size=800,600
No address box, no scrollbars, no toolbar, no menus, just Keep. Add this to the end of the command to start Chrome in the shortcut box.
Browse in silence
One of the most annoying things on the web is audio that plays automatically when a page loads. Often this is because of a video and often because it is an advert. If you really don’t like audio on the web, it can be disabled.
Right click a tab and there is a Mute Site menu option that blocks the site, but the next site you go to might have auto-playing audio or video. It would be a pain to have to mute every site individually, so there is a global mute command line switch:
–mute-audio
No sound will be heard from Chrome. This stops not only irritating sound in auto-playing ads, but also YouTube and other sites that have audio. If you want to listen to music or video, start Chrome in the normal way.
Continue browsing
Open Chrome’s menu and select Settings. In the On startup section is an option to start Chrome exactly where you left off last time. So if you had five tabs open with different websites and web pages last time you closed Chrome, it will reopen them when Chrome is next started.
This feature is useful when you want to continue browsing all the sites you had open last time, but it is an irritation when you don’t and lots of tabs open. It slows down startup and you then have to close them all before going to the website you really want.
Create a desktop shortcut with the following command line switch:
–restore-last-session
You then have the option of starting Chrome normally and going to the default home page or starting Chrome with all your tabs from last time by clicking the desktop shortcut.
Increase privacy
Incognito mode is a great way to browse the web without your identity or history being used by websites. You are not completely anonymous, but it helps a lot. To hide even more of your online activities, use these command line switches:
–incognito –no-referrers
Websites can tell where you came from, basically the website you were previously looking at, and –noreferrers hides this information. Websites may look at where you came from, the referrer, when analysing traffic, which is mostly harmless, but this prevents it if you prefer to keep this information private.
Enable Chrome dark mode
Chrome has a dark mode and it can be enabled using a command line switch:
–force-dark-mode
It makes the browser dark, not web pages, which use their own colour schemes. There is no dark mode in Chrome’s menu or settings right now, but this command line switch still enables dark mode, so it could be coming soon to Chrome settings.
A comprehensive list of command line switches can be found here but beware, it’ll blow you mind! There are just too many and most of them are not useful to ordinary folk.
Comment in the Forums 
Save money on apps/services 
Get the essential all-in-one toolkit for Apple Mac. CleanMyMac X cleans junk files, protects from malware, uninstalls apps and left-over files and more.
Search this site
Big savings and great products…
CHAT, DISCUSS, LEAVE COMMENTS
Leave a comment in the free forums. Join the discussions, non-members welcome.
REMOVE THE ADS
Join and become a member! Get the benefits: Less ads, less tracking, faster browsing.