After running the command line, exit the Terminal, restart your Mac. To confirm, open Chrome, and then bring up the Chrome menu — you won’t see the New Incognito Window option anymore.
Safari for Mac's version of incognito mode is called Private Browsing. To turn it on from a Mac using OS X Mavericks (10.9) or older, launch Safari and go from the Safari menu to Private Browsing. When you're done, go back to Safari Private Browsing to disable it. Starting in the version of Safari for Mac released with OS X Yosemite (10.10) or later, Private Browsing is replaced with Private Mode. This allows you to open a private window from the top menu bar while keeping non-private windows open. To activate it, go to File New Private Window. Using Incognito or Private Mode is popular when you would like to have your browsing and search history automatically deleted at the end of the session.
Cookies are also removed at the end of the session. Beware that your internet service provider (ISP) or any nefarious actors can still spy on online activities, so it's not completely secure. In Safari for iOS, you can switch to Private by pressing the 'Private' button on the 'new tab' screen. If you're not sure how to get to the 'new tab' screen, tab the icon that looks like two squares stacked on another. It can be found at the bottom left corner of the screen in Safari for iPhone and the top right corner in Safari for iPad. Alternatively, there is a shortcut in iOS to open a new Private tab.
Tap and hold on the Tabs icon (again, the one that looks like two squares) and a menu will appear that includes an option for New Private Tab. You can also use this same menu to close a single tab or close every tab you have open. The Close All Tabs option is especially useful for Safari users that have accumulated tens or hundreds tabs.