Close ad

Most of the important macOS settings can be found in System Preferences, whether it is display settings, users, or various accessibility functions. However, the more experienced know that many other settings can be configured through the Terminal. However, the condition is to know the correct commands. In this article, let's take a look at how to work with commands in the Terminal, and especially imagine some of them.

How to work with commands on a Mac

All commands are entered on the Mac through the native Terminal application. We can start this in several ways. The most natural way is to visit the folder in the Finder Application, choose here Utility and then run the application Terminal. Of course, there is also the possibility to launch the application through Spotlight - just press the keyboard shortcut Command + spacebar, type Terminal in the search field, and then launch it. After starting, you will see a small black window in which all commands are already written. Confirm each command with the Enter key.

Some commands have a variable after their wording that reads "true" or "false". If the "true" option appears after the command in any of the commands below, simply disable it again by rewriting "true" to "false". If it is different, it will be indicated in the description of the order. So let's dive into the more interesting part of this article, which is the commands themselves.

Even before entering the first command in the Terminal, keep in mind that the Jablíčkář magazine is not responsible for any malfunction of the operating system and other problems that may arise from the use of the mentioned commands. We tested all the commands ourselves before publishing the article. Even so, under certain circumstances, a problem can arise that cannot be predicted. The use of commands is therefore recommended for advanced users.

Another screenshot format

If you want to set a different format for saving screenshots, use the command below. Just replace the text "png" with the format you want to use. You can use, for example, jpg, gif, bmp and other formats.

defaults write com.apple.screencapture type -string "png"

Default expanded panel when saving

If you want to set the panel to automatically open for all options when saving, then execute both commands below.

defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true

Deactivation of the function for automatic termination of applications

MacOS automatically shuts down some applications after a period of inactivity. If you want to prevent this, use this command.

defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true

Deactivation of the notification center and its icon

If you have decided that the notification center on your Mac is unnecessary, you can use the command below to hide it. It will hide both the icon and the notification center itself.

launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null

Set the lower right corner of the trackpad as a right click

If you want to make the trackpad in the lower right corner behave as if you pressed the right mouse button, then execute these four commands.

defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1
defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true

Folders always come first

If you want the folders in the Finder to always appear in the first place after sorting, use this command.

defaults write com.apple.finder _FXSortFoldersFirst -bool true

Show hidden Library folder

The Library folder is hidden by default. This is how you easily uncover it.

chflags nohidden ~/Library

Setting your own default display of files in the Finder

Using this command, you can set your own default display of files in the Finder. To set it up, just replace "Nlsv" in the command below with one of these options: "icnv" for icon display, "clmv" for column display, and "Flwv" for sheet display.

defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"

Display only active applications in the Dock

If you want to have a clean Dock and display only those applications that are active, use this command.

defaults write com.apple.dock static-only -bool true

Enable automatic restart in case of macOS update

Use this command to enable your Mac to automatically restart if necessary after an update.

defaults write com.apple.commerce AutoUpdateRestartRequired -bool true
MacBook glowing with apple logo

If you want to see countless other commands, you can do so on GitHub with this link. User Mathyas Bynens has created a perfect database of all possible and impossible commands that you might find useful.

.