System Commands

Alfred includes a very useful set of system commands so that you can quickly control macOS directly from your keyboard.

System Commands

Using System Commands in Alfred

The System Commands keywords allow you to tell your Mac to perform an action without having to use the mouse to find a menu item in macOS.

Actions are performed with the associated keyword, and each keyword can be customised in Alfred Preferences > Features > System. Some actions include an optional confirmation pop-up.

System Commands

The actions include:

Screen Saver
Show Trash
Empty Trash
Log Out
Sleep
Sleep Displays
Lock
Restart
Shut Down
Hide (applications)
Quit (applications)
Force Quit (applications)
Quit All (applications)
Volume Up
Volume Down
Toggle Mute
Eject (Local Mounted Volumes)
Eject All
Tip

Want to lock your screen without returning to the login screen? Open System Settings > Lock Screen and set Require password after screen saver begins or display is turned off to Immediately. Using the screensaver keyword will now lock your screen, requiring a password or Touch ID to unlock.

If you prefer this to the default Lock action, you can even disable the Lock action and change the screensaver keyword to lock.

Using the Eject and Eject All commands

The Eject and Eject All actions have additional optional settings.

Setting media types to eject

By default, Alfred looks for local mounted volumes when you use the Eject action. This includes USB drives and mounted images.

You can change the type of media included in your Eject list, changing to scope to only removable media, or to more broadly include Mounts in /Volumes as well.

Excluding volumes from eject

If there are any volumes you want to avoid ejecting by mistake, these can be added to the exclusions. Click the + button in the bottom right and type the name of the volume you'd like Alfred to exclude from the Eject list.

Wildcards (using the asterisk *) and simple character classes (e.g. [Bb]ackup) can be used for volumes where the name can vary.

You can remove the volume later on by selecting it and pressing the - button, and can reset the original Exclude list with the Reset button.