System Grab Bag

View all TLDR pages from Mac OS X (or from all pages)

photoanalysisd

This analyzes photo libraries for Memories, People, and scene or object based search. It should not be invoked manually. More information: https://www.manpagez.com/man/8/photoanalysisd/.
  • Start the daemon:
    photoanalysisd

gchmod

This command is an alias of GNU chmod.
  • View documentation for the original command:
    tldr -p linux chmod

gstat

This command is an alias of GNU stat.
  • View documentation for the original command:
    tldr -p linux stat

ftxdiff

Compare differences between two fonts. More information: https://developer.apple.com/fonts.
  • Output differences to a specific text file:
    ftxdiff --output {{path/to/fontdiff_file.txt}} {{path/to/font_file1.ttc}} {{path/to/font_file2.ttc}}
  • Include glyph names in output:
    ftxdiff --include-glyph-names
  • Include unicode names in output:
    ftxdiff --include-unicode-names

gcut

This command is an alias of GNU cut.
  • View documentation for the original command:
    tldr -p linux cut

gptx

This command is an alias of GNU ptx.
  • View documentation for the original command:
    tldr -p linux ptx

shutdown

Shutdown and reboot the system. More information: https://ss64.com/osx/shutdown.html.
  • Power off (halt) immediately:
    shutdown -h now
  • Sleep immediately:
    shutdown -s now
  • Reboot immediately:
    shutdown -r now
  • Reboot in 5 minutes:
    shutdown -r "+{{5}}"
  • Power off (halt) at 1:00 pm (Uses 24h clock):
    shutdown -h {{1300}}
  • Reboot on May 10th 2042 at 11:30 am (Input format: YYMMDDHHMM):
    shutdown -r {{4205101130}}

gsha512sum

This command is an alias of GNU sha512sum.
  • View documentation for the original command:
    tldr -p linux sha512sum

gyes

This command is an alias of GNU yes.
  • View documentation for the original command:
    tldr -p linux yes



lpstat

Display status information about the current classes, jobs, and printers. More information: https://ss64.com/osx/lpstat.html.
  • Show a long listing of printers, classes, and jobs:
    lpstat -l
  • Force encryption when connecting to the CUPS server:
    lpstat -E
  • Show the ranking of print jobs:
    lpstat -R
  • Show whether or not the CUPS server is running:
    lpstat -r
  • Show all status information:
    lpstat -t

bless

Set volume boot capability and startup disk options. More information: https://ss64.com/osx/bless.html.
  • Bless a volume with only Mac OS X or Darwin, and create the BootX and boot.efi files as needed:
    bless --folder {{/Volumes/Mac OS X/System/Library/CoreServices}} --bootinfo --bootefi
  • Set a volume containing either Mac OS 9 and Mac OS X to be the active volume:
    bless --mount {{/Volumes/Mac OS}} --setBoot
  • Set the system to NetBoot and broadcast for an available server:
    bless --netboot --server {{bsdp://255.255.255.255}}
  • Gather information about the currently selected volume (as determined by the firmware), suitable for piping to a program capable of parsing Property Lists:
    bless --info --plist

gchroot

This command is an alias of GNU chroot.
  • View documentation for the original command:
    tldr -p linux chroot

opensnoop

Tool that tracks file opens on your system. More information: https://ss64.com/osx/opensnoop.html.
  • Print all file opens as they occur:
    sudo opensnoop
  • Track all file opens by a process by name:
    sudo opensnoop -n "{{process_name}}"
  • Track all file opens by a process by PID:
    sudo opensnoop -p {{PID}}
  • Track which processes open a specified file:
    sudo opensnoop -f {{path/to/file}}

xattr

Utility to work with extended filesystem attributes. More information: https://ss64.com/osx/xattr.html.
  • List key:value extended attributes for a given file:
    xattr -l {{file}}
  • Write an attribute for a given file:
    xattr -w {{attribute_key}} {{attribute_value}} {{file}}
  • Delete an attribute from a given file:
    xattr -d {{com.apple.quarantine}} {{file}}
  • Delete all extended attributes from a given file:
    xattr -c {{file}}
  • Recursively delete an attribute in a given directory:
    xattr -rd {{attribute_key}} {{directory}}

lldb

The LLVM Low-Level Debugger. More information: https://lldb.llvm.org/man/lldb.html.
  • Debug an executable:
    lldb "{{executable}}"
  • Attach lldb to a running process with a given PID:
    lldb -p {{pid}}
  • Wait for a new process to launch with a given name, and attach to it:
    lldb -w -n "{{process_name}}"

duti

Set default applications for document types and URL schemes on macOS. More information: https://github.com/moretension/duti.
  • Set Safari as the default handler for HTML documents:
    duti -s {{com.apple.Safari}} {{public.html}} all
  • Set VLC as the default viewer for files with .m4v extensions:
    duti -s {{org.videolan.vlc}} {{m4v}} viewer
  • Set Finder as the default handler for the ftp:// URL scheme:
    duti -s {{com.apple.Finder}} "{{ftp}}"
  • Display information about the default application for a given extension:
    duti -x {{ext}}
  • Display the default handler for a given UTI:
    duti -d {{uti}}
  • Display all handlers of a given UTI:
    duti -l {{uti}}

xml2man

Compile MPGL to mdoc. More information: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/HeaderDoc/mpgl/mpgl.html.
  • Compile an MPGL file to a viewable man page:
    xml2man {{path/to/command_file.mxml}}
  • Compile an MPGL file to a specific output file:
    xml2man {{path/to/service_file.mxml}} {{path/to/service_file.7}}
  • Compile an MPGL file to a specific output file, overwriting if it already exists:
    xml2man -f {{path/to/function_file.mxml}} {{path/to/function_file.3}}

afplay

Command-line audio player. More information: https://ss64.com/osx/afplay.html.
  • Play a sound file (waits until playback ends):
    afplay {{path/to/file}}
  • Play a sound file at 2x speed (playback rate):
    afplay --rate {{2}} {{path/to/file}}
  • Play a sound file at half speed:
    afplay --rate {{0.5}} {{path/to/file}}
  • Play the first N seconds of a sound file:
    afplay --time {{seconds}} {{path/to/file}}


grexec

This command is an alias of GNU rexec.
  • View documentation for the original command:
    tldr -p linux rexec

gfmt

This command is an alias of GNU fmt.
  • View documentation for the original command:
    tldr -p linux fmt

brightness

Get and set the brightness level of all internal and certain external displays. More information: https://github.com/nriley/brightness.
  • Show current brightness:
    brightness -l
  • Set the brightness to 100%:
    brightness {{1}}
  • Set the brightness to 50%:
    brightness {{0.5}}

genv

This command is an alias of GNU env.
  • View documentation for the original command:
    tldr -p linux env

ghostid

This command is an alias of GNU hostid.
  • View documentation for the original command:
    tldr -p linux hostid

gcsplit

This command is an alias of GNU csplit.
  • View documentation for the original command:
    tldr -p linux csplit

securityd

This manages security contexts and cryptographic operations. Works with secd for keychain access. It should not be invoked manually. More information: https://www.unix.com/man-page/osx/1/securityd/.
  • Start the daemon:
    securityd

pod

Dependency manager for Swift and Objective-C Cocoa projects. More information: https://guides.cocoapods.org/terminal/commands.html.
  • Create a Podfile for the current project with the default contents:
    pod init
  • Download and install all pods defined in the Podfile (that haven't been installed before):
    pod install
  • List all available pods:
    pod list
  • Show the outdated pods (of those currently installed):
    pod outdated
  • Update all currently installed pods to their newest version:
    pod update
  • Update a specific (previously installed) pod to its newest version:
    pod update {{pod_name}}
  • Remove CocoaPods from a Xcode project:
    pod deintegrate {{xcode_project}}

softwareupdate

Update macOS App Store apps. More information: https://ss64.com/osx/softwareupdate.html.
  • List all available updates:
    softwareupdate --list
  • Download and install all updates:
    softwareupdate --install --all
  • Download and install all recommended updates:
    softwareupdate --install --req
  • Download and install a specific app:
    softwareupdate --install {{update_name}}

gtr

This command is an alias of GNU tr.
  • View documentation for the original command:
    tldr -p linux tr

ghead

This command is an alias of GNU head.
  • View documentation for the original command:
    tldr -p linux head

dd

Convert and copy a file. More information: https://keith.github.io/xcode-man-pages/dd.1.html.
  • Make a bootable USB drive from an isohybrid file (such like archlinux-xxx.iso) and show the progress:
    dd if={{path/to/file.iso}} of={{/dev/usb_device}} status=progress
  • Clone a drive to another drive with 4 MB block, ignore error and show the progress:
    dd if={{/dev/source_device}} of={{/dev/dest_device}} bs={{4m}} conv={{noerror}} status=progress
  • Generate a file of 100 random bytes by using kernel random driver:
    dd if=/dev/urandom of={{path/to/random_file}} bs={{100}} count={{1}}
  • Benchmark the write performance of a disk:
    dd if=/dev/zero of={{path/to/1GB_file}} bs={{1024}} count={{1000000}}
  • Generate a system backup into an IMG file and show the progress:
    dd if=/dev/{{drive_device}} of={{path/to/file.img}} status=progress
  • Restore a drive from an IMG file and show the progress:
    dd if={{path/to/file.img}} of={{/dev/drive_device}} status=progress
  • Check the progress of an ongoing dd operation (run this command from another shell):
    kill -USR1 $(pgrep ^dd)


route

Manually manipulate the routing tables. Necessitates to be root. More information: https://www.manpagez.com/man/8/route/.
  • Add a route to a destination through a gateway:
    sudo route add "{{destination_ip_address}}" "{{gateway_address}}"
  • Add a route to a /24 subnet through a gateway:
    sudo route add "{{subnet_ip_address}}/24" "{{gateway_address}}"
  • Run in test mode (does not do anything, just print):
    sudo route -t add "{{destination_ip_address}}/24" "{{gateway_address}}"
  • Remove all routes:
    sudo route flush
  • Delete a specific route:
    sudo route delete "{{destination_ip_address}}/24"
  • Lookup and display the route for a destination (hostname or IP address):
    sudo route get "{{destination}}"

networksetup

Configuration tool for Network System Preferences. More information: https://support.apple.com/guide/remote-desktop/about-networksetup-apdd0c5a2d5/mac.
  • List available network service providers (Ethernet, Wi-Fi, Bluetooth, etc):
    networksetup -listallnetworkservices
  • Show network settings for a particular networking device:
    networksetup -getinfo "{{Wi-Fi}}"
  • Get currently connected Wi-Fi network name (Wi-Fi device usually en0 or en1):
    networksetup -getairportnetwork {{en0}}
  • Connect to a particular Wi-Fi network:
    networksetup -setairportnetwork {{en0}} {{Airport Network SSID}} {{password}}

xctool

Tool for building Xcode projects. More information: https://github.com/facebook/xctool.
  • Build a single project without any workspace:
    xctool -project {{YourProject.xcodeproj}} -scheme {{YourScheme}} build
  • Build a project that is part of a workspace:
    xctool -workspace {{YourWorkspace.xcworkspace}} -scheme {{YourScheme}} build
  • Clean, build and execute all the tests:
    xctool -workspace {{YourWorkspace.xcworkspace}} -scheme {{YourScheme}} clean build test

uname

Print details about the current machine and the operating system running on it. Note: for additional information about the operating system, try the sw_vers command. More information: https://ss64.com/osx/uname.html.
  • Print kernel name:
    uname
  • Print system architecture and processor information:
    uname -mp
  • Print kernel name, kernel release and kernel version:
    uname -srv
  • Print system hostname:
    uname -n
  • Print all available system information:
    uname -a

notifyd

Notification server. It should not be invoked manually. More information: https://www.manpagez.com/man/8/notifyd/.
  • Start the daemon:
    notifyd
  • Log debug messages to the default log file (/var/log/notifyd.log):
    notifyd -d
  • Log debug messages to an alternate log file:
    notifyd -d -log_file {{path/to/log_file}}

gusers

This command is an alias of GNU users.
  • View documentation for the original command:
    tldr -p linux users

spotify

A command-line interface to Spotify. More information: https://github.com/hnarayanan/shpotify.
  • Find a song by name and play it:
    spotify play {{song_name}}
  • Find a playlist by name and play it:
    spotify play list {{playlist_name}}
  • Pause (or resume) playback:
    spotify pause
  • Skip to the next song in a playlist:
    spotify next
  • Change volume:
    spotify vol {{up|down|value}}
  • Show the playback status and song details:
    spotify status

md5

Calculate MD5 cryptographic checksums. More information: https://ss64.com/osx/md5.html.
  • Calculate the MD5 checksum for a file:
    md5 {{path/to/file}}
  • Calculate MD5 checksums for multiple files:
    md5 {{path/to/file1 path/to/file2 ...}}
  • Output only the md5 checksum (no filename):
    md5 -q {{path/to/file}}
  • Print a checksum of the given string:
    md5 -s "{{string}}"

gmknod

This command is an alias of GNU mknod.
  • View documentation for the original command:
    tldr -p linux mknod

pbpaste

Send the contents of the clipboard to stdout. Comparable to pressing Cmd + V on the keyboard. More information: https://ss64.com/osx/pbpaste.html.
  • Write the contents of the clipboard to a file:
    pbpaste > {{path/to/file}}
  • Use the contents of the clipboard as input to a command:
    pbpaste | grep foo

gexpr

This command is an alias of GNU expr.
  • View documentation for the original command:
    tldr -p linux expr

gdf

This command is an alias of GNU df.
  • View documentation for the original command:
    tldr -p linux df

grsh

This command is an alias of GNU rsh.
  • View documentation for the original command:
    tldr -p linux rsh

shuf

Generate random permutations. More information: https://www.unix.com/man-page/linux/1/shuf/.
  • Randomize the order of lines in a file and output the result:
    shuf {{filename}}
  • Only output the first 5 entries of the result:
    shuf --head-count={{5}} {{filename}}
  • Write output to another file:
    shuf {{filename}} --output={{output_filename}}
  • Generate random numbers in range 1-10:
    shuf --input-range={{1-10}}

hdiutil

Utility to create and manage disk images. More information: https://ss64.com/osx/hdiutil.html.
  • Mount an image:
    hdiutil attach {{path/to/image_file}}
  • Unmount an image:
    hdiutil detach /Volumes/{{volume_file}}
  • List mounted images:
    hdiutil info
  • Create an ISO image from the contents of a directory:
    hdiutil makehybrid -o {{path/to/output_file}} {{path/to/directory}}

greadlink

This command is an alias of GNU readlink.
  • View documentation for the original command:
    tldr -p linux readlink


wifivelocityd

XPC helper for performing system context actions for the WiFiVelocity framework. It should not be invoked manually. More information: http://www.manpagez.com/man/8/wifivelocityd/.
  • Start the daemon:
    wifivelocityd

gcp

This command is an alias of GNU cp.
  • View documentation for the original command:
    tldr -p linux cp

ps

Information about running processes. More information: https://www.unix.com/man-page/osx/1/ps/.
  • List all running processes:
    ps aux
  • List all running processes including the full command string:
    ps auxww
  • Search for a process that matches a string:
    ps aux | grep {{string}}
  • Get the parent PID of a process:
    ps -o ppid= -p {{pid}}
  • Sort processes by memory usage:
    ps -m
  • Sort processes by CPU usage:
    ps -r

gmv

This command is an alias of GNU mv.
  • View documentation for the original command:
    tldr -p linux mv

coreauthd

A system daemon providing the LocalAuthentication framework. It should not be invoked manually. See also: coreautha. More information: https://www.manpagez.com/man/8/coreauthd/.
  • Start the agent:
    coreauthd

tail

Display the last part of a file. See also: head. More information: https://manned.org/man/freebsd-13.0/tail.1.
  • Show last 'count' lines in file:
    tail -n {{8}} {{path/to/file}}
  • Print a file from a specific line number:
    tail -n +{{8}} {{path/to/file}}
  • Print a specific count of bytes from the end of a given file:
    tail -c {{8}} {{path/to/file}}
  • Print the last lines of a given file and keep reading file until Ctrl + C:
    tail -f {{path/to/file}}
  • Keep reading file until Ctrl + C, even if the file is inaccessible:
    tail -F {{path/to/file}}
  • Show last 'count' lines in 'file' and refresh every 'seconds' seconds:
    tail -n {{8}} -s {{10}} -f {{path/to/file}}

gmd5sum

This command is an alias of GNU md5sum.
  • View documentation for the original command:
    tldr -p linux md5sum

indent

Change the appearance of a C/C++ program by inserting or deleting whitespace. More information: https://www.freebsd.org/cgi/man.cgi?query=indent.
  • Format C/C++ source according to the Berkeley style:
    indent {{path/to/source_file.c}} {{path/to/indented_file.c}} -nbad -nbap -bc -br -c33 -cd33 -cdb -ce -ci4 -cli0 -di16 -fc1 -fcb -i4 -ip -l75 -lp -npcs -nprs -psl -sc -nsob -ts8
  • Format C/C++ source according to the style of Kernighan & Ritchie (K&R):
    indent {{path/to/source_file.c}} {{path/to/indented_file.c}} -nbad -bap -nbc -br -c33 -cd33 -ncdb -ce -ci4 -cli0 -cs -d0 -di1 -nfc1 -nfcb -i4 -nip -l75 -lp -npcs -nprs -npsl -nsc -nsob

base64

Encode and decode using Base64 representation. More information: https://www.unix.com/man-page/osx/1/base64/.
  • Encode a file:
    base64 --input={{plain_file}}
  • Decode a file:
    base64 --decode --input={{base64_file}}
  • Encode from stdin:
    echo -n "{{plain_text}}" | base64
  • Decode from stdin:
    echo -n {{base64_text}} | base64 --decode

uptime

Tell how long the system has been running and other information. More information: https://ss64.com/osx/uptime.html.
  • Print current time, uptime, number of logged-in users and other information:
    uptime

guname

This command is an alias of GNU uname.
  • View documentation for the original command:
    tldr -p linux uname

translationd

Enables Translation features. It should not be invoked manually.
  • Start the daemon:
    translationd


osascript

Run AppleScript or JavaScript for Automation (JXA). More information: https://ss64.com/osx/osascript.html.
  • Run an AppleScript command:
    osascript -e "{{say 'Hello world'}}"
  • Run multiple AppleScript commands:
    osascript -e "{{say 'Hello'}}" -e "{{say 'world'}}"
  • Run a compiled (*.scpt), bundled (*.scptd), or plaintext (*.applescript) AppleScript file:
    osascript {{path/to/apple.scpt}}
  • Get the bundle identifier of an application (useful for open -b):
    osascript -e 'id of app "{{Application}}"'
  • Run a JavaScript command:
    osascript -l JavaScript -e "{{console.log('Hello world');}}"
  • Run a JavaScript file:
    osascript -l JavaScript {{path/to/script.js}}

as

Portable GNU assembler. Primarily intended to assemble output from gcc to be used by ld. More information: https://www.unix.com/man-page/osx/1/as/.
  • Assemble a file, writing the output to a.out:
    as {{path/to/file.s}}
  • Assemble the output to a given file:
    as {{path/to/file.s}} -o {{path/to/output_file.o}}
  • Generate output faster by skipping whitespace and comment preprocessing. (Should only be used for trusted compilers):
    as -f {{path/to/file.s}}
  • Include a given path to the list of directories to search for files specified in .include directives:
    as -I {{path/to/directory}} {{path/to/file.s}}

sysctl

Access kernel state information. More information: https://ss64.com/osx/sysctl.html.
  • Show all available variables and their values:
    sysctl -a
  • Show Apple model identifier:
    sysctl -n hw.model
  • Show CPU model:
    sysctl -n machdep.cpu.brand_string
  • Show available CPU features (MMX, SSE, SSE2, SSE3, AES, etc):
    sysctl -n machdep.cpu.features
  • Set a changeable kernel state variable:
    sysctl -w {{section.tunable}}={{value}}


timed

Service that synchronizes system time (e.g. using NTP). It should not be invoked manually. More information: https://manned.org/timed.
  • Start the daemon:
    timed

gwc

This command is an alias of GNU wc.
  • View documentation for the original command:
    tldr -p linux wc


gsort

This command is an alias of GNU sort.
  • View documentation for the original command:
    tldr -p linux sort

mate

General-purpose text editor for macOS. More information: https://macromates.com/.
  • Start TextMate:
    mate
  • Open specific files:
    mate {{path/to/file1 path/to/file2 ...}}
  • Specify the filetype of a file:
    mate --type {{filetype}} {{path/to/file}}
  • Open and wait until finished editing a specific file:
    mate --wait {{path/to/file}}
  • Open a file with the cursor at a specific line and column:
    mate --line {{line_number}}:{{column_number}} {{path/to/file}}

pmset

Configure macOS power management settings, as one might do in System Preferences > Energy Saver. Commands that modify settings must begin with sudo. More information: https://ss64.com/osx/pmset.html.
  • Display the current power management settings:
    pmset -g
  • Display the current power source and battery levels:
    pmset -g batt
  • Put display to sleep immediately:
    pmset displaysleepnow
  • Set display to never sleep when on charger power:
    sudo pmset -c displaysleep 0
  • Set display to sleep after 15 minutes when on battery power:
    sudo pmset -b displaysleep 15
  • Schedule computer to automatically wake up every weekday at 9 AM:
    sudo pmset repeat wake MTWRF 09:00:00
  • Restore to system defaults:
    sudo pmset -a displaysleep 10 disksleep 10 sleep 30 womp 1

icalBuddy

Command-line utility for printing events and tasks from the macOS calendar database. More information: https://hasseg.org/icalBuddy/.
  • Show events later today:
    icalBuddy --includeOnlyEventsFromNowOn eventsToday
  • Show uncompleted tasks:
    icalBuddy uncompletedTasks
  • Show a formatted list separated by calendar for all events today:
    icalBuddy --formatOutput --separateByCalendar eventsToday
  • Show tasks for a specified number of days:
    icalBuddy --includeOnlyEventsFromNowOn "tasksDueBefore:today+{{8}}"
  • Show events in a time range:
    icalBuddy eventsFrom:{{start_date}} to:{{end_date}}



grmdir

This command is an alias of GNU rmdir.
  • View documentation for the original command:
    tldr -p linux rmdir

gtelnet

This command is an alias of GNU telnet.
  • View documentation for the original command:
    tldr -p linux telnet

tart

Build, run and manage macOS and Linux virtual machines (VMs) on Apple Silicon. More information: https://github.com/cirruslabs/tart.
  • Pull a remote VM image:
    tart pull {{acme.io/org/name:tag}}
  • Clone a VM from a local or remote image source:
    tart clone {{source-vm}} {{vm-name}}
  • Create a new Mac VM from a specific ipsw file:
    tart create --from-ipsw={{latest|path/to/file.ipsw}} {{vm-name}}
  • Run an existing VM:
    tart run {{vm-name}}
  • Run an existing VM with a specific mounted directory:
    tart run --dir={{path/to/directory}}:{{/path/to/local_directory}} {{vm-name}}
  • List VMs:
    tart list
  • Get IP address of a running VM:
    tart ip {{vm-name}}
  • Change a VM's display resolution:
    tart set {{vm-name}} --display {{640}}x{{400}}

asr

Restore (copy) a disk image onto a volume. The command name stands for Apple Software Restore. More information: https://www.unix.com/man-page/osx/8/asr/.
  • Restore a disk image to a target volume:
    sudo asr restore --source {{image_file.dmg}} --target {{path/to/volume_file}}
  • Erase the target volume before restoring:
    sudo asr restore --source {{image_file.dmg}} --target {{path/to/volume_file}} --erase
  • Skip verification after restoring:
    sudo asr restore --source {{image_file.dmg}} --target {{path/to/volume_file}} --noverify
  • Clone volumes without the use of an intermediate disk image:
    sudo asr restore --source {{path/to/volume_file}} --target {{path/to/volume_file}}

gmkfifo

This command is an alias of GNU mkfifo.
  • View documentation for the original command:
    tldr -p linux mkfifo

gtac

This command is an alias of GNU tac.
  • View documentation for the original command:
    tldr -p linux tac

ditto

Copy files and directories. More information: https://ss64.com/osx/ditto.html.
  • Overwrite contents of destination directory with contents of source directory:
    ditto {{path/to/source_directory}} {{path/to/destination_directory}}
  • Print a line to the Terminal window for every file that's being copied:
    ditto -V {{path/to/source_directory}} {{path/to/destination_directory}}
  • Copy a given file or directory, while retaining the original file permissions:
    ditto -rsrc {{path/to/source_directory}} {{path/to/destination_directory}}

xcodes runtimes

Manage Xcode Simulator runtimes. More information: https://github.com/xcodesorg/xcodes.
  • Display all available Simulator runtimes:
    xcodes runtimes --include-betas
  • Download a Simulator runtime:
    xcodes runtimes download {{runtime-name}}
  • Download and install a Simulator runtime:
    xcodes runtimes install {{runtime-name}}

istats

Show various statistics such as the CPU temperature, fan speeds and battery status. More information: https://github.com/Chris911/iStats.
  • Show all the stats:
    istats
  • Show all CPU stats:
    istats cpu
  • Show all fan stats:
    istats fan
  • Scan and print temperatures:
    istats scan

log

View, export, and configure logging systems. More information: https://www.dssw.co.uk/reference/log.html.
  • Stream live system logs:
    log stream
  • Stream logs sent to syslog from the process with a specific PID:
    log stream --process {{process_id}}
  • Show logs sent to syslog from a process with a specific name:
    log show --predicate "process == '{{process_name}}'"
  • Export all logs to disk for the past hour:
    sudo log collect --last {{1h}} --output {{path/to/file.logarchive}}

gunits

This command is an alias of GNU units.
  • View documentation for the original command:
    tldr -p linux units

xcrun

Run or locate development tools and properties. More information: https://www.unix.com/man-page/osx/1/xcrun/.
  • Find and run a tool from the active developer directory:
    xcrun {{tool}} {{arguments}}
  • Show verbose output:
    xcrun {{tool}} {{arguments}} --verbose
  • Find a tool for a given SDK:
    xcrun --sdk {{sdk_name}}
  • Find a tool for a given toolchain:
    xcrun --toolchain {{name}}
  • Display version:
    xcrun --version
  • Display help:
    xcrun --help


god

This command is an alias of GNU od.
  • View documentation for the original command:
    tldr -p linux od


gping

This command is an alias of GNU ping.
  • View documentation for the original command:
    tldr -p linux ping

dot_clean

Merge ._* files with corresponding native files. More information: https://ss64.com/osx/dot_clean.html.
  • Merge all ._* files recursively:
    dot_clean {{path/to/directory}}
  • Don't recursively merge all ._* in a directory (flat merge):
    dot_clean -f {{path/to/directory}}
  • Merge and delete all ._* files:
    dot_clean -m {{path/to/directory}}
  • Only delete ._* files if there's a matching native file:
    dot_clean -n {{path/to/directory}}
  • Follow symlinks:
    dot_clean -s {{path/to/directory}}
  • Print verbose output:
    dot_clean -v {{path/to/directory}}

guptime

This command is an alias of GNU uptime.
  • View documentation for the original command:
    tldr -p linux uptime

gping6

This command is an alias of GNU ping6.
  • View documentation for the original command:
    tldr -p linux ping6

gfold

This command is an alias of GNU fold.
  • View documentation for the original command:
    tldr -p linux fold

autofsd

Runs automount on startup and network configuration change events. It should not be invoked manually. More information: https://www.manpagez.com/man/8/autofsd/.
  • Start the daemon:
    autofsd

cut

Cut out fields from stdin or files. More information: https://manned.org/man/freebsd-13.0/cut.1.
  • Print a specific character/field range of each line:
    {{command}} | cut -{{c|f}} {{1|1,10|1-10|1-|-10}}
  • Print a range of each line with a specific delimiter:
    {{command}} | cut -d "{{,}}" -{{c}} {{1}}
  • Print a range of each line of a specific file:
    cut -{{c}} {{1}} {{path/to/file}}


yabai

A tiling window manager for macOS based on binary space partitioning. More information: https://github.com/koekeishiya/yabai.
  • Set the layout to bsp:
    yabai -m config layout {{bsp}}
  • Set the window gap to 10pt:
    yabai -m config window_gap {{10}}
  • Enable opacity:
    yabai -m config window_opacity on
  • Disable window shadow:
    yabai -m config window_shadow off
  • Enable status bar:
    yabai -m config status_bar on

apachectl

Apache HTTP Server control interface for macOS. More information: https://www.unix.com/man-page/osx/8/apachectl/.
  • Start the org.apache.httpd launchd job:
    apachectl start
  • Stop the launchd job:
    apachectl stop
  • Stop, then start launchd job:
    apachectl restart

grcp

This command is an alias of GNU rcp.
  • View documentation for the original command:
    tldr -p linux rcp

gkill

This command is an alias of GNU kill.
  • View documentation for the original command:
    tldr -p linux kill

lex

Lexical analyzer generator. Given the specification for a lexical analyzer, generates C code implementing it. More information: https://keith.github.io/xcode-man-pages/lex.1.html.
  • Generate an analyzer from a Lex file:
    lex {{analyzer.l}}
  • Specify the output file:
    lex {{analyzer.l}} --outfile {{analyzer.c}}
  • Compile a C file generated by Lex:
    cc {{path/to/lex.yy.c}} --output {{executable}}

gftp

This command is an alias of GNU ftp.
  • View documentation for the original command:
    tldr -p linux ftp

watchdogd

Works with the Watchdog KEXT to ensure that the system is healthy and running. It should not be invoked manually. More information: https://www.manpagez.com/man/8/watchdogd/.
  • Start the daemon:
    watchdogd


gpinky

This command is an alias of GNU pinky.
  • View documentation for the original command:
    tldr -p linux pinky

gsha224sum

This command is an alias of GNU sha224sum.
  • View documentation for the original command:
    tldr -p linux sha224sum

wifi-password

Get the password of the Wi-Fi. More information: https://github.com/rauchg/wifi-password.
  • Get the password for the Wi-Fi you are currently logged onto:
    wifi-password
  • Get the password for the Wi-Fi with a specific SSID:
    wifi-password {{ssid}}
  • Print only the password as output:
    wifi-password -q

spctl

Manage the security assessment policy subsystem. Utility for managing Gatekeeper in macOS. More information: https://www.unix.com/man-page/osx/8/SPCTL/.
  • Turn off Gatekeeper:
    spctl --master-disable
  • Add a rule to allow an application to run (labeling of rule is optional):
    spctl --add --label {{rule_name}} {{path/to/file}}
  • Turn on Gatekeeper:
    spctl --master-enable
  • List all rules on the system:
    spctl --list

gchcon

This command is an alias of GNU chcon.
  • View documentation for the original command:
    tldr -p linux chcon

xsltproc

Transform XML with XSLT to produce output (usually HTML or XML). More information: http://www.xmlsoft.org/xslt/xsltproc.html.
  • Transform an XML file with a specific XSLT stylesheet:
    xsltproc --output {{path/to/output_file.html}} {{path/to/stylesheet_file.xslt}} {{path/to/file.xml}}
  • Pass a value to a parameter in the stylesheet:
    xsltproc --output {{path/to/output_file.html}} --stringparam "{{name}}" "{{value}}" {{path/to/stylesheet_file.xslt}} {{path/to/xml_file.xml}}

aa

This command is an alias of yaa.
  • View documentation for the original command:
    tldr yaa

gfactor

This command is an alias of GNU factor.
  • View documentation for the original command:
    tldr -p linux factor


gsed

This command is an alias of GNU sed.
  • View documentation for the original command:
    tldr -p linux sed

gprintenv

This command is an alias of GNU printenv.
  • View documentation for the original command:
    tldr -p linux printenv

glogger

This command is an alias of GNU logger.
  • View documentation for the original command:
    tldr -p linux logger

gstty

This command is an alias of GNU stty.
  • View documentation for the original command:
    tldr -p linux stty

ginstall

This command is an alias of GNU install.
  • View documentation for the original command:
    tldr -p linux install

SafeEjectGPU

Eject a GPU safely. More information: https://www.unix.com/man-page/mojave/8/safeejectgpu.
  • Eject all GPUs:
    SafeEjectGPU Eject
  • List all GPUs attached:
    SafeEjectGPU gpus
  • List apps using a GPU:
    SafeEjectGPU gpuid {{GPU_ID}} apps
  • Get the status of a GPU:
    SafeEjectGPU gpuid {{GPU_ID}} status
  • Eject a GPU:
    SafeEjectGPU gpuid {{GPU_ID}} Eject
  • Launch an app on a GPU:
    SafeEjectGPU gpuid {{GPU_ID}} LaunchOnGPU {{path/to/App.app}}

carthage

A dependency management tool for Cocoa applications. More information: https://github.com/Carthage/Carthage.
  • Download the latest version of all dependencies mentioned in Cartfile, and build them:
    carthage update
  • Update dependencies, but only build for iOS:
    carthage update --platform ios
  • Update dependencies, but don't build any of them:
    carthage update --no-build
  • Download and rebuild the current version of dependencies (without updating them):
    carthage bootstrap
  • Rebuild a specific dependency:
    carthage build {{dependency}}

gwhoami

This command is an alias of GNU whoami.
  • View documentation for the original command:
    tldr -p linux whoami

mas

Command-line interface for the Mac App Store. More information: https://github.com/mas-cli/mas.
  • Sign into the Mac App Store for the first time:
    mas signin "{{[email protected]}}"
  • Show all installed applications and their product identifiers:
    mas list
  • Search for an application, displaying the price alongside the results:
    mas search "{{application}}" --price
  • Install or update an application:
    mas install {{product_identifier}}
  • Install all pending updates:
    mas upgrade


gunexpand

This command is an alias of GNU unexpand.
  • View documentation for the original command:
    tldr -p linux unexpand

date

Set or display the system date. More information: https://ss64.com/osx/date.html.
  • Display the current date using the default locale's format:
    date +%c
  • Display the current date in UTC and ISO 8601 format:
    date -u +%Y-%m-%dT%H:%M:%SZ
  • Display the current date as a Unix timestamp (seconds since the Unix epoch):
    date +%s
  • Display a specific date (represented as a Unix timestamp) using the default format:
    date -r 1473305798

glocate

This command is an alias of GNU locate.
  • View documentation for the original command:
    tldr -p linux locate

nvram

Manipulate firmware variables. More information: https://ss64.com/osx/nvram.html.
  • [p]rint all the variables stored in the NVRAM:
    nvram -p
  • [p]rint all the variables stored in the NVRAM using [x]ML format:
    nvram -xp
  • Modify the value of a firmware variable:
    sudo nvram {{name}}="{{value}}"
  • [d]elete a firmware variable:
    sudo nvram -d {{name}}
  • [c]lear all the firmware variables:
    sudo nvram -c
  • Set a firmware variable from a specific [x]ML [f]ile:
    sudo nvram -xf {{path/to/file.xml}}

GetFileInfo

Get information about a file in an HFS+ directory. More information: https://www.unix.com/man-page/osx/1/GetFileInfo/.
  • Display information about a given file:
    GetFileInfo {{path/to/filename}}
  • Display the date and time a given file was created:
    GetFileInfo -d {{path/to/filename}}
  • Display the date and time a given file was last modified:
    GetFileInfo -m {{path/to/filename}}
  • Display the creator of a given file:
    GetFileInfo -c {{path/to/filename}}

drutil

Interact with DVD burners. More information: https://ss64.com/osx/drutil.html.
  • Eject a disk from the drive:
    drutil eject
  • Burn a directory as an ISO9660 filesystem onto a DVD. Don't verify and eject when complete:
    drutil burn -noverify -eject -iso9660

codesign

Create and manipulate code signatures for macOS. More information: https://www.unix.com/man-page/osx/1/codesign/.
  • Sign an application with a certificate:
    codesign --sign "{{My Company Name}}" {{path/to/application_file.app}}
  • Verify the certificate of an application:
    codesign --verify {{path/to/application_file.app}}

ipconfig

View and control IP configuration state. More information: https://ss64.com/osx/ipconfig.html.
  • List all network interfaces:
    ipconfig getiflist
  • Show the IP address of an interface:
    ipconfig getifaddr {{interface_name}}

g[

This command is an alias of GNU [.
  • View documentation for the original command:
    tldr -p linux [

cot

The Plain-Text Editor for macOS. More information: https://coteditor.com/.
  • Start CotEditor:
    cot
  • Open specific files:
    cot {{path/to/file1 path/to/file2 ...}}
  • Open a new blank document:
    cot --new
  • Open a specific file and block the terminal until it is closed:
    cot --wait {{path/to/file}}
  • Open a specific file with the cursor at a specific line and column:
    cot --line {{1}} --column {{80}} {{path/to/file}}



diskutil

Utility to manage local disks and volumes. More information: https://ss64.com/osx/diskutil.html.
  • List all currently available disks, partitions and mounted volumes:
    diskutil list
  • Repair the filesystem data structures of a volume:
    diskutil repairVolume {{/dev/disk_device}}
  • Unmount a volume:
    diskutil unmountDisk {{/dev/disk_device}}
  • Eject a CD/DVD (unmount first):
    diskutil eject {{/dev/disk_device1}}

gsha256sum

This command is an alias of GNU sha256sum.
  • View documentation for the original command:
    tldr -p linux sha256sum

gprintf

This command is an alias of GNU printf.
  • View documentation for the original command:
    tldr -p linux printf

whence

A zsh builtin to indicate how a given command would be interpreted. More information: https://www.unix.com/man-page/OpenSolaris/1/whence/.
  • Interpret {{command}}, with expansion if defined as an alias (similar to the command -v builtin):
    whence "{{command}}"
  • Display type of {{command}}, with location if defined as a function, or binary (equivalent to the type and command -V builtins):
    whence -v "{{command}}"
  • Same as above, except display content of shell functions instead of location (equivalent to which builtin):
    whence -c "{{command}}"
  • Same as above, but show all occurrences on command path (equivalent to the where builtin):
    whence -ca "{{command}}"
  • Search only the PATH for {{command}}, ignoring builtins, aliases or shell functions (equivalent to the where command):
    whence -p "{{command}}"

xed

Opens files for editing in Xcode. More information: https://www.manpagez.com/man/1/xed/.
  • Open file in Xcode:
    xed {{file1}}
  • Open file(s) in Xcode, create if it doesn't exist:
    xed --create {{filename1}}
  • Open a file in Xcode and jump to line number 75:
    xed --line 75 {{filename}}

yaa

Create and manipulate YAA archives. More information: https://www.manpagez.com/man/1/yaa/.
  • Create an archive from a directory:
    yaa archive -d {{path/to/directory}} -o {{path/to/output_file.yaa}}
  • Create an archive from a file:
    yaa archive -i {{path/to/file}} -o {{path/to/output_file.yaa}}
  • Extract an archive to the current directory:
    yaa extract -i {{path/to/archive_file.yaa}}
  • List the contents of an archive:
    yaa list -i {{path/to/archive_file.yaa}}
  • Create an archive with a specific compression algorithm:
    yaa archive -a {{algorithm}} -d {{path/to/directory}} -o {{path/to/output_file.yaa}}
  • Create an archive with an 8 MB block size:
    yaa archive -b {{8m}} -d {{path/to/directory}} -o {{path/to/output_file.yaa}}

mdfind

List files matching a given query. More information: https://ss64.com/osx/mdfind.html.
  • Find a file by its name:
    mdfind -name {{file}}
  • Find a file by its content:
    mdfind "{{query}}"
  • Find a file containing a string, in a given directory:
    mdfind -onlyin {{directory}} "{{query}}"

cat

Print and concatenate files. More information: https://keith.github.io/xcode-man-pages/cat.1.html.
  • Print the contents of a file to stdout:
    cat {{path/to/file}}
  • Concatenate several files into an output file:
    cat {{path/to/file1 path/to/file2 ...}} > {{path/to/output_file}}
  • Append several files to an output file:
    cat {{path/to/file1 path/to/file2 ...}} >> {{path/to/output_file}}
  • Copy the contents of a file into an output file without buffering:
    cat -u {{/dev/tty12}} > {{/dev/tty13}}
  • Write stdin to a file:
    cat - > {{path/to/file}}
  • Number all output lines:
    cat -n {{path/to/file}}
  • Display non-printable and whitespace characters (with M- prefix if non-ASCII):
    cat -v -t -e {{path/to/file}}

gupdatedb

This command is an alias of GNU updatedb.
  • View documentation for the original command:
    tldr -p linux updatedb

qlmanage

QuickLook server tool. More information: https://ss64.com/osx/qlmanage.html.
  • Display QuickLook for one or multiple files:
    qlmanage -p {{path/to/file1 path/to/file2 ...}}
  • Compute 300px wide PNG thumbnails of all JPEGs in the current directory and put them in a directory:
    qlmanage {{*.jpg}} -t -s {{300}} {{path/to/directory}}
  • Reset QuickLook:
    qlmanage -r

caffeinate

Prevent macOS from sleeping. More information: https://ss64.com/osx/caffeinate.html.
  • Prevent from sleeping for 1 hour (3600 seconds):
    caffeinate -u -t {{3600}}
  • Prevent from sleeping until a command completes:
    caffeinate -s "{{command}}"
  • Prevent from sleeping (use Ctrl + C to exit):
    caffeinate -i
  • Prevent disk from sleeping (use Ctrl + C to exit):
    caffeinate -m

deleted

Keeps track of purgeable space and asks clients to purge when space is low. It should not be invoked manually. More information: https://www.manpagez.com/man/8/deleted/.
  • Start the daemon:
    deleted

gmktemp

This command is an alias of GNU mktemp.
  • View documentation for the original command:
    tldr -p linux mktemp

xcode-select

Switch between different versions of Xcode and the included developer tools. Also used to update the path to Xcode if it is moved after installation. More information: https://developer.apple.com/library/archive/technotes/tn2339/_index.html.
  • Install Xcode's command-line tools:
    xcode-select --install
  • Select a given path as the active developer directory:
    xcode-select --switch {{path/to/Xcode.app/Contents/Developer}}
  • Select a given Xcode instance and use its developer directory as the active one:
    xcode-select --switch {{path/to/Xcode_file.app}}
  • Print the currently selected developer directory:
    xcode-select --print-path
  • Discard any user-specified developer directory so that it will be found via the default search mechanism:
    sudo xcode-select --reset

setfile

Sets file attributes on files in an HFS+ directory. More information: https://ss64.com/osx/setfile.html.
  • Set creation date for specific files:
    setfile -d "{{MM/DD/YYYY HH:MM:SS}}" {{path/to/file1 path/to/file2 ...}}
  • Set modification date for specific files:
    setfile -m "{{MM/DD/YYYY HH:MM:SS}}" {{path/to/file1 path/to/file2 ...}}
  • Set modification date for symlink file (not to linked file itself):
    setfile -P -m "{{MM/DD/YYYY HH:MM:SS}}" {{path/to/file1 path/to/file2 ...}}

gnice

This command is an alias of GNU nice.
  • View documentation for the original command:
    tldr -p linux nice

sed

Edit text in a scriptable manner. See also: awk, ed. More information: https://keith.github.io/xcode-man-pages/sed.1.html.
  • Replace all apple (basic regex) occurrences with mango (basic regex) in all input lines and print the result to stdout:
    {{command}} | sed 's/apple/mango/g'
  • Execute a specific script [f]ile and print the result to stdout:
    {{command}} | sed -f {{path/to/script_file.sed}}
  • Replace all apple (extended regex) occurrences with APPLE (extended regex) in all input lines and print the result to stdout:
    {{command}} | sed -E 's/(apple)/\U\1/g'
  • Print just a first line to stdout:
    {{command}} | sed -n '1p'
  • Replace all apple (basic regex) occurrences with mango (basic regex) in a file and save a backup of the original to file.bak:
    sed -i bak 's/apple/mango/g' {{path/to/file}}

gtrue

This command is an alias of GNU true.
  • View documentation for the original command:
    tldr -p linux true

gdd

This command is an alias of GNU dd.
  • View documentation for the original command:
    tldr -p linux dd

gid

This command is an alias of GNU id.
  • View documentation for the original command:
    tldr -p linux id



sw_vers

Print macOS operating system version information. More information: https://ss64.com/osx/sw_vers.html.
  • Print all available information (OS name, version number, and build):
    sw_vers
  • Print only the version number of the operating system:
    sw_vers -productVersion
  • Print only the build identifier:
    sw_vers -buildVersion


gbase32

This command is an alias of GNU base32.
  • View documentation for the original command:
    tldr -p linux base32

gdircolors

This command is an alias of GNU dircolors.
  • View documentation for the original command:
    tldr -p linux dircolors

gcksum

This command is an alias of GNU cksum.
  • View documentation for the original command:
    tldr -p linux cksum

gtalk

This command is an alias of GNU talk.
  • View documentation for the original command:
    tldr -p linux talk

arch

Display the name of the system architecture, or run a command under a different architecture. See also uname. More information: https://www.unix.com/man-page/osx/1/arch/.
  • Display the system's architecture:
    arch
  • Run a command using x86_64:
    arch -x86_64 "{{command}}"
  • Run a command using arm:
    arch -arm64 "{{command}}"

gawk

This command is an alias of GNU awk.
  • View documentation for the original command:
    tldr -p linux awk

gchown

This command is an alias of GNU chown.
  • View documentation for the original command:
    tldr -p linux chown

gtftp

This command is an alias of GNU tftp.
  • View documentation for the original command:
    tldr -p linux tftp


gpaste

This command is an alias of GNU paste.
  • View documentation for the original command:
    tldr -p linux paste

whatis

Tool that searches a set of database files containing short descriptions of system commands for keywords. More information: http://www.linfo.org/whatis.html.
  • Search for information about keyword:
    whatis {{keyword}}
  • Search for information about multiple keywords:
    whatis {{keyword1}} {{keyword2}}

gecho

This command is an alias of GNU echo.
  • View documentation for the original command:
    tldr -p linux echo


ocspd

This retrieves and caches Certificate Revocation Lists (CRLs) and Online Certificate Status Protocol (OCSP) responses for certificate verification. It should not be invoked manually. More information: https://www.manpagez.com/man/1/ocspd/.
  • Start the daemon:
    ocspd


reboot

Reboot the system. More information: https://ss64.com/osx/reboot.html.
  • Reboot immediately:
    sudo reboot
  • Reboot immediately without gracefully shutting down:
    sudo reboot -q

cal

Prints calendar information. More information: https://ss64.com/osx/cal.html.
  • Display a calendar for the current month:
    cal
  • Display previous, current and next month:
    cal -3
  • Display a calendar for a specific month (1-12 or name):
    cal -m {{month}}
  • Display a calendar for the current year:
    cal -y
  • Display a calendar for a specific year (4 digits):
    cal {{year}}
  • Display a calendar for a specific month and year:
    cal {{month}} {{year}}
  • Display date of Easter (Western Christian churches) in a given year:
    ncal -e {{year}}

gdirname

This command is an alias of GNU dirname.
  • View documentation for the original command:
    tldr -p linux dirname

gnl

This command is an alias of GNU nl.
  • View documentation for the original command:
    tldr -p linux nl

gshred

This command is an alias of GNU shred.
  • View documentation for the original command:
    tldr -p linux shred

fsck

Check the integrity of a filesystem or repair it. The filesystem should be unmounted at the time the command is run. It is a wrapper that calls fsck_hfs, fsck_apfs, fsck_msdos, fsck_exfat, and fsck_udf as needed. More information: https://ss64.com/osx/fsck.html.
  • Check filesystem /dev/sdX, reporting any damaged blocks:
    fsck {{/dev/sdX}}
  • Check filesystem /dev/sdX only if it is clean, reporting any damaged blocks and interactively letting the user choose to repair each one:
    fsck -f {{/dev/sdX}}
  • Check filesystem /dev/sdX only if it is clean, reporting any damaged blocks and automatically repairing them:
    fsck -fy {{/dev/sdX}}
  • Check filesystem /dev/sdX, reporting whether it has been cleanly unmounted:
    fsck -q {{/dev/sdX}}

rename

Rename a file or group of files with a regular expression. More information: https://www.manpagez.com/man/2/rename/.
  • Replace from with to in the filenames of the specified files:
    rename 's/{{from}}/{{to}}/' {{*.txt}}

w

Show who is logged on and what they are doing. Print user login, TTY, remote host, login time, idle time, current process. More information: https://ss64.com/osx/w.html.
  • Show logged-in users information:
    w
  • Show logged-in users information without a header:
    w -h
  • Show information about logged-in users, sorted by their idle time:
    w -i

dmesg

Write the kernel messages to stdout. More information: https://www.manpagez.com/man/8/dmesg/.
  • Show kernel messages:
    dmesg
  • Show how much physical memory is available on this system:
    dmesg | grep -i memory
  • Show kernel messages 1 page at a time:
    dmesg | less

gtraceroute

This command is an alias of GNU traceroute.
  • View documentation for the original command:
    tldr -p linux traceroute

gstdbuf

This command is an alias of GNU stdbuf.
  • View documentation for the original command:
    tldr -p linux stdbuf

guniq

This command is an alias of GNU uniq.
  • View documentation for the original command:
    tldr -p linux uniq

pkgutil

Query and manipulate Mac OS X Installer packages and receipts. More information: https://ss64.com/osx/pkgutil.html.
  • List package IDs for all installed packages:
    pkgutil --pkgs
  • Verify cryptographic signatures of a package file:
    pkgutil --check-signature {{path/to/filename.pkg}}
  • List all the files for an installed package given its ID:
    pkgutil --files {{com.microsoft.Word}}
  • Extract the contents of a package file into a directory:
    pkgutil --expand-full {{path/to/filename.pkg}} {{path/to/directory}}

grm

This command is an alias of GNU rm.
  • View documentation for the original command:
    tldr -p linux rm

csshX

Cluster SSH tool for macOS. More information: https://github.com/brockgr/csshx.
  • Connect to multiple hosts:
    csshX {{hostname1}} {{hostname2}}
  • Connect to multiple hosts with a given SSH key:
    csshX {{user@hostname1}} {{user@hostname2}} --ssh_args "-i {{path/to/key_file.pem}}"
  • Connect to a pre-defined cluster from /etc/clusters:
    csshX cluster1

kmutil

Utility for managing kernel extensions (kexts) and kext collections on disk. More information: https://keith.github.io/xcode-man-pages/kmutil.8.html.
  • Find kexts available on the operating system:
    kmutil find
  • Display logging information about the Kernel Management sub-system:
    kmutil log
  • Inspect and display a kext collection's contents according to the options provided:
    kmutil inspect {{options}}
  • Check the consistency of kext collections against each other:
    kmutil check
  • Dump kernelmanagerd state for debugging:
    sudo kmutil dumpstate
  • Load one or more extensions based on the bundle specified at this path in the results:
    kmutil load --bundle-path {{path/to/extension.kext}}

gtruncate

This command is an alias of GNU truncate.
  • View documentation for the original command:
    tldr -p linux truncate

auvaltool

AudioUnit validation tool for Mac. More information: https://www.unix.com/man-page/mojave/1/auvaltool.
  • List all [a]vailable AudioUnits of any type:
    auvaltool -a
  • List all [a]vailable AudioUnits of any type with their [l]ocation:
    auvaltool -al

gruncon

This command is an alias of GNU runcon.
  • View documentation for the original command:
    tldr -p linux runcon

xip

Create or expand compressed files in a secure xip archive. Only archives signed by Apple are trusted, so this tool should not be used to create archives. More information: https://www.manpagez.com/man/1/xip/.
  • Expand the archive into the current working directory:
    xip --expand {{path/to/file.xip}}


split

Split a file into pieces. More information: https://ss64.com/osx/split.html.
  • Split a file, each split having 10 lines (except the last split):
    split -l {{10}} {{filename}}
  • Split a file by a regular expression. The matching line will be the first line of the next output file:
    split -p {{cat|^[dh]og}} {{filename}}
  • Split a file with 512 bytes in each split (except the last split; use 512k for kilobytes and 512m for megabytes):
    split -b {{512}} {{filename}}
  • Split a file into 5 files. File is split such that each split has same size (except the last split):
    split -n {{5}} {{filename}}

gtar

This command is an alias of GNU tar.
  • View documentation for the original command:
    tldr -p linux tar

port

Package manager for macOS. More information: https://www.macports.org.
  • Search for a package:
    port search {{search_term}}
  • Install a package:
    sudo port install {{package}}
  • List installed packages:
    port installed
  • Update port and fetch the latest list of available packages:
    sudo port selfupdate
  • Upgrade outdated packages:
    sudo port upgrade outdated
  • Remove old versions of installed packages:
    sudo port uninstall inactive

aiac

Use OpenAI to generate IaC configurations, utilities, queries and more. More information: https://github.com/gofireflyio/aiac.
  • Generate Terraform for Azure storage account:
    aiac get terraform {{for an azure storage account}}
  • Generate a Dockerfile for nginx:
    aiac get dockerfile {{for a secured nginx}}
  • Generate GitHub action that applies Terraform:
    aiac get github action {{that plans and applies terraform}}
  • Generate a port scanner in Python:
    aiac get python {{code that scans all open ports in my network}}
  • Generate a MongoDB query:
    aiac get mongo {{query that aggregates all documents by created date}}

csrutil

Manage the System Integrity Protection configuration. More information: https://ss64.com/osx/csrutil.html.
  • Display the System Integrity Protection status:
    csrutil status
  • Disable the System Integrity Protection:
    csrutil disable
  • Enable the System Integrity Protection:
    csrutil enable
  • Display the list of allowed NetBoot sources:
    csrutil netboot list
  • Add an IPv4 address to the list of allowed NetBoot sources:
    csrutil netboot add {{ip}}
  • Reset the System Integrity Protection status and clear the NetBoot list:
    csrutil clear

gwho

This command is an alias of GNU who.
  • View documentation for the original command:
    tldr -p linux who

gtty

This command is an alias of GNU tty.
  • View documentation for the original command:
    tldr -p linux tty

gifconfig

This command is an alias of GNU ifconfig.
  • View documentation for the original command:
    tldr -p linux ifconfig

terminal-notifier

Send macOS User Notifications. More information: https://github.com/julienXX/terminal-notifier.
  • Send a notification (only the message is required):
    terminal-notifier -group {{tldr-info}} -title {{TLDR}} -message '{{TLDR rocks}}'
  • Display piped data with a sound:
    echo '{{Piped Message Data!}}' | terminal-notifier -sound {{default}}
  • Open a URL when the notification is clicked:
    terminal-notifier -message '{{Check your Apple stock!}}' -open '{{http://finance.yahoo.com/q?s=AAPL}}'
  • Open an app when the notification is clicked:
    terminal-notifier -message '{{Imported 42 contacts.}}' -activate {{com.apple.AddressBook}}

gmake

This command is an alias of GNU make.
  • View documentation for the original command:
    tldr -p linux make

vpnd

Listens for incoming VPN connections. It should not be invoked manually. More information: https://www.unix.com/man-page/osx/8/vpnd/.
  • Start the daemon:
    vpnd
  • Run the daemon in the foreground:
    vpnd -x
  • Run the daemon in the foreground and print logs to the terminal:
    vpnd -d
  • Run the daemon in the foreground, print logs to the terminal, and quit after validating arguments:
    vpnd -n
  • Print usage summary and exit:
    vpnd -h
  • Run the daemon for a specific server configuration:
    vpnd -i {{server_id}}

systemsetup

Configure System Preferences machine settings. More information: https://support.apple.com/guide/remote-desktop/about-systemsetup-apd95406b8d/mac.
  • Enable remote login (SSH):
    systemsetup -setremotelogin on
  • Specify timezone, NTP Server and enable network time:
    systemsetup -settimezone "{{US/Pacific}}" -setnetworktimeserver {{us.pool.ntp.org}} -setusingnetworktime on
  • Make the machine never sleep and automatically restart on power failure or kernel panic:
    systemsetup -setsleep off -setrestartpowerfailure on -setrestartfreeze on
  • List valid startup disks:
    systemsetup -liststartupdisks
  • Specify a new startup disk:
    systemsetup -setstartupdisk {{path/to/directory}}

grealpath

This command is an alias of GNU realpath.
  • View documentation for the original command:
    tldr -p linux realpath

gwhois

This command is an alias of GNU whois.
  • View documentation for the original command:
    tldr -p linux whois

gfgrep

This command is an alias of GNU fgrep.
  • View documentation for the original command:
    tldr -p linux fgrep

gnproc

This command is an alias of GNU nproc.
  • View documentation for the original command:
    tldr -p linux nproc



tmutil

Utility for managing Time Machine backups. Most verbs require root privileges. More information: https://ss64.com/osx/tmutil.html.
  • Set an HFS+ drive as the backup destination:
    sudo tmutil setdestination {{path/to/disk_mount_point}}
  • Set an APF share or SMB share as the backup destination:
    sudo tmutil setdestination "{{protocol://user[:password]@host/share}}"
  • Append the given destination to the list of destinations:
    sudo tmutil setdestination -a {{destination}}
  • Enable automatic backups:
    sudo tmutil enable
  • Disable automatic backups:
    sudo tmutil disable
  • Start a backup, if one is not running already, and release control of the shell:
    sudo tmutil startbackup
  • Start a backup and block until the backup is finished:
    sudo tmutil startbackup -b
  • Stop a backup:
    sudo tmutil stopbackup

top

Display dynamic real-time information about running processes. More information: https://ss64.com/osx/top.html.
  • Start top, all options are available in the interface:
    top
  • Start top sorting processes by internal memory size (default order - process ID):
    top -o mem
  • Start top sorting processes first by CPU, then by running time:
    top -o cpu -O time
  • Start top displaying only processes owned by given user:
    top -user {{user_name}}
  • Get help about interactive commands:
    ?

gseq

This command is an alias of GNU seq.
  • View documentation for the original command:
    tldr -p linux seq

security

Administer keychains, keys, certificates and the Security framework. More information: https://ss64.com/osx/security.html.
  • List all available keychains:
    security list-keychains
  • Delete a specific keychain:
    security delete-keychain {{path/to/file.keychain}}
  • Create a keychain:
    security create-keychain -p {{password}} {{path/to/file.keychain}}
  • Set a certificate to use with a website or [s]ervice by its [c]ommon name (fails if several certificates with the same common name exist):
    security set-identity-preference -s {{URL|hostname|service}} -c "{{common_name}}" {{path/to/file.keychain}}
  • Add a certificate from file to a [k]eychain (if -k isn't specified, the default keychain is used):
    security add-certificates -k {{file.keychain}} {{path/to/cert_file.pem}}
  • Add a CA certificate to the per-user Trust Settings:
    security add-trusted-cert -k {{path/to/user-keychain.keychain-db}} {{path/to/ca-cert_file.pem}}
  • Remove a CA certificate from the per-user Trust Settings:
    security remove-trusted-cert {{path/to/ca-cert_file.pem}}

launchctl

Control Apple's launchd manager for launch daemons (system-wide services) and launch agents (per-user programs). launchd loads XML-based *.plist files placed in the appropriate locations, and runs the corresponding commands according to their defined schedule. More information: https://manned.org/launchctl.
  • Activate a user-specific agent to be loaded into launchd whenever the user logs in:
    launchctl load ~/Library/LaunchAgents/{{my_script}}.plist
  • Activate an agent which requires root privileges to run and/or should be loaded whenever any user logs in (note the absence of ~ in the path):
    sudo launchctl load /Library/LaunchAgents/{{root_script}}.plist
  • Activate a system-wide daemon to be loaded whenever the system boots up (even if no user logs in):
    sudo launchctl load /Library/LaunchDaemons/{{system_daemon}}.plist
  • Show all loaded agents/daemons, with the PID if the process they specify is currently running, and the exit code returned the last time they ran:
    launchctl list
  • Unload a currently loaded agent, e.g. to make changes (note: the plist file is automatically loaded into launchd after a reboot and/or logging in):
    launchctl unload ~/Library/LaunchAgents/{{my_script}}.plist
  • Manually run a known (loaded) agent/daemon, even if it is not the right time (note: this command uses the agent's label, rather than the filename):
    launchctl start {{script_file}}
  • Manually kill the process associated with a known agent/daemon, if it is running:
    launchctl stop {{script_file}}

system_profiler

Report system hardware and software configuration. More information: https://ss64.com/osx/system_profiler.html.
  • Display a report with specific details level (mini [no personal information], basic or full):
    system_profiler -detailLevel {{level}}
  • Display a full system profiler report which can be opened by System Profiler.app:
    system_profiler -xml > MyReport.spx
  • Display a hardware overview (Model, CPU, Memory, Serial, etc) and software data (System, Kernel, Name, Uptime, etc):
    system_profiler SPHardwareDataType SPSoftwareDataType
  • Print the system serial number:
    system_profiler SPHardwareDataType|grep "Serial Number (system)" | awk '{ print $4 }'

ping

Send ICMP ECHO_REQUEST packets to network hosts. More information: https://ss64.com/osx/ping.html.
  • Ping the specified host:
    ping "{{hostname}}"
  • Ping a host a specific number of times:
    ping -c {{count}} "{{host}}"
  • Ping host, specifying the interval in seconds between requests (default is 1 second):
    ping -i {{seconds}} "{{host}}"
  • Ping host without trying to lookup symbolic names for addresses:
    ping -n "{{host}}"
  • Ping host and ring the bell when a packet is received (if your terminal supports it):
    ping -a "{{host}}"
  • Ping host and prints the time a packet was received (this option is an Apple addition):
    ping --apple-time "{{host}}"

head

Output the first part of files. More information: https://keith.github.io/xcode-man-pages/head.1.html.
  • Output the first few lines of a file:
    head --lines {{8}} {{path/to/file}}
  • Output the first few bytes of a file:
    head --bytes {{8}} {{path/to/file}}
  • Output everything but the last few lines of a file:
    head --lines -{{8}} {{path/to/file}}
  • Output everything but the last few bytes of a file:
    head --bytes -{{8}} {{path/to/file}}

gtsort

This command is an alias of GNU tsort.
  • View documentation for the original command:
    tldr -p linux tsort

gbasenc

This command is an alias of GNU basenc.
  • View documentation for the original command:
    tldr -p linux basenc

gfalse

This command is an alias of GNU false.
  • View documentation for the original command:
    tldr -p linux false

nettop

Display updated information about the network. More information: https://www.manpagez.com/man/1/nettop/.
  • Monitor TCP and UDP sockets from all interfaces:
    nettop
  • Monitor TCP sockets from Loopback interfaces:
    nettop -m {{tcp}} -t {{loopback}}
  • Monitor a specific process:
    nettop -p "{{process_id|process_name}}"
  • Display a per-process summary:
    nettop -P
  • Print 10 samples of network information:
    nettop -l {{10}}
  • Monitor changes every 5 seconds:
    nettop -d -s {{5}}
  • While running nettop, list interactive commands:
    h
  • Display help:
    nettop -h

gls

This command is an alias of GNU ls.
  • View documentation for the original command:
    tldr -p linux ls

gegrep

This command is an alias of GNU egrep.
  • View documentation for the original command:
    tldr -p linux egrep

valet

A Laravel development environment that allows hosting sites via local tunnels on http://<example>.test. More information: https://laravel.com/docs/valet.
  • Start the valet daemon:
    valet start
  • Register the current working directory as a path that Valet should search for sites:
    valet park
  • View 'parked' paths:
    valet paths
  • Serve a single site instead of an entire directory:
    valet link {{application_name}}
  • Share a project via an Ngrok tunnel:
    valet share

wacaw

Command-line tool for macOS to capture both still pictures and video from an attached camera. More information: http://webcam-tools.sourceforge.net.
  • Take a picture from webcam:
    wacaw {{filename}}
  • Record a video:
    wacaw --video {{filename}} --duration {{10}}
  • Take a picture with custom resolution:
    wacaw --width {{width}} --height {{100}} {{filename}}
  • Copy image just taken to clipboard:
    wacaw --to-clipboard
  • List the devices available:
    wacaw --list-devices

gjoin

This command is an alias of GNU join.
  • View documentation for the original command:
    tldr -p linux join

gnohup

This command is an alias of GNU nohup.
  • View documentation for the original command:
    tldr -p linux nohup

gdir

This command is an alias of GNU dir.
  • View documentation for the original command:
    tldr -p linux dir


wps

Assists AirPort in connecting to a network using Wireless Protected Setup. It should not be invoked manually. More information: https://www.manpagez.com/man/8/wps/.
  • Start the daemon:
    wps

systemsoundserverd

Core Audio related daemon. It should not be invoked manually.
  • Start the daemon:
    systemsoundserverd

gpathchk

This command is an alias of GNU pathchk.
  • View documentation for the original command:
    tldr -p linux pathchk

chflags

Change file or directory flags. More information: https://ss64.com/osx/chflags.html.
  • Set the hidden flag for a file:
    chflags {{hidden}} {{path/to/file}}
  • Unset the hidden flag for a file:
    chflags {{nohidden}} {{path/to/file}}
  • Recursively set the uchg flag for a directory:
    chflags -R {{uchg}} {{path/to/directory}}
  • Recursively unset the uchg flag for a directory:
    chflags -R {{nouchg}} {{path/to/directory}}

mdutil

Manage the metadata stores used by Spotlight for indexing. More information: https://ss64.com/osx/mdutil.html.
  • Show the indexing status of the startup volume:
    mdutil -s {{/}}
  • Turn on/off the Spotlight indexing for a given volume:
    mdutil -i {{on|off}} {{path/to/volume}}
  • Turn on/off indexing for all volumes:
    mdutil -a -i {{on|off}}
  • Erase the metadata stores and restart the indexing process:
    mdutil -E {{path/to/volume}}

du

Disk usage: estimate and summarize file and directory space usage. More information: https://ss64.com/osx/du.html.
  • List the sizes of a directory and any subdirectories, in the given unit (KiB/MiB/GiB):
    du -{{k|m|g}} {{path/to/directory}}
  • List the sizes of a directory and any subdirectories, in human-readable form (i.e. auto-selecting the appropriate unit for each size):
    du -h {{path/to/directory}}
  • Show the size of a single directory, in human-readable units:
    du -sh {{path/to/directory}}
  • List the human-readable sizes of a directory and of all the files and directories within it:
    du -ah {{path/to/directory}}
  • List the human-readable sizes of a directory and any subdirectories, up to N levels deep:
    du -h -d {{2}} {{path/to/directory}}
  • List the human-readable size of all .jpg files in subdirectories of the current directory, and show a cumulative total at the end:
    du -ch {{*/*.jpg}}

gsha1sum

This command is an alias of GNU sha1sum.
  • View documentation for the original command:
    tldr -p linux sha1sum

coreautha

A system agent providing the LocalAuthentication framework. It should not be invoked manually. See also: coreauthd. More information: https://www.manpagez.com/man/8/coreautha/.
  • Start the agent:
    coreautha

glibtool

This command is an alias of GNU libtool.
  • View documentation for the original command:
    tldr -p linux libtool

gsleep

This command is an alias of GNU sleep.
  • View documentation for the original command:
    tldr -p linux sleep

fdesetup

Set and retrieve FileVault related information. More information: https://www.unix.com/man-page/mojave/8/fdesetup/.
  • List current FileVault enabled users:
    sudo fdesetup list
  • Get current FileVault status:
    fdesetup status
  • Add FileVault enabled user:
    sudo fdesetup add -usertoadd user1
  • Enable FileVault:
    sudo fdesetup enable
  • Disable FileVault:
    sudo fdesetup disable

emond

Event Monitor service that accepts events from various services, runs them through a simple rules engine, and takes action. The actions can run commands, send email, or SMS messages. More information: https://www.manpagez.com/man/8/emond/.
  • Start the daemon:
    emond
  • Specify rules for emond to process by giving a path to a file or directory:
    emond -r {{path/to/file_or_directory}}
  • Use a specific configuration file:
    emond -c {{path/to/config_file}}

gunlink

This command is an alias of GNU unlink.
  • View documentation for the original command:
    tldr -p linux unlink

gxargs

This command is an alias of GNU xargs.
  • View documentation for the original command:
    tldr -p linux xargs

ged

This command is an alias of GNU ed.
  • View documentation for the original command:
    tldr -p linux ed


gpr

This command is an alias of GNU pr.
  • View documentation for the original command:
    tldr -p linux pr


dhcp6d

Stateless DHCPv6 server. See also: InternetSharing. It should not be invoked manually. More information: https://www.manpagez.com/man/8/dhcp6d/.
  • Start the daemon:
    dhcp6d
  • Use a custom configuration:
    dhcp6d {{path/to/config_file}}

networkQuality

Measure the network quality by connecting to the internet. More information: https://support.apple.com/HT212313.
  • Test the network quality for the default interface:
    networkQuality
  • Test the upload and download speeds sequentially instead of in parallel:
    networkQuality -s
  • Test a specified network interface:
    networkQuality -I {{en0}}
  • Test the network quality with verbose output:
    networkQuality -v

gdate

This command is an alias of GNU date.
  • View documentation for the original command:
    tldr -p linux date


gnumfmt

This command is an alias of GNU numfmt.
  • View documentation for the original command:
    tldr -p linux numfmt

airport

Wireless network configuration utility. More information: https://ss64.com/osx/airport.html.
  • Show current wireless status information:
    airport --getinfo
  • Sniff wireless traffic on channel 1:
    airport sniff {{1}}
  • Scan for available wireless networks:
    airport --scan
  • Disassociate from current airport network:
    sudo airport --disassociate

gtime

This command is an alias of GNU time.
  • View documentation for the original command:
    tldr -p linux time

bc

An arbitrary precision calculator language. See also: dc. More information: https://manned.org/man/freebsd-13.0/bc.1.
  • Start an interactive session:
    bc
  • Start an interactive session with the standard math library enabled:
    bc --mathlib
  • Calculate an expression:
    bc --expression='{{5 / 3}}'
  • Execute a script:
    bc {{path/to/script.bc}}
  • Calculate an expression with the specified scale:
    bc --expression='scale = {{10}}; {{5 / 3}}'
  • Calculate a sine/cosine/arctangent/natural logarithm/exponential function using mathlib:
    bc --mathlib --expression='{{s|c|a|l|e}}({{1}})'

httpie

A user friendly HTTP tool. More information: https://github.com/httpie/httpie.
  • Send a GET request (default method with no request data):
    http {{https://example.com}}
  • Send a POST request (default method with request data):
    http {{https://example.com}} {{hello=World}}
  • Send a POST request with redirected input:
    http {{https://example.com}} < {{file.json}}
  • Send a PUT request with a given JSON body:
    http PUT {{https://example.com/todos/7}} {{hello=world}}
  • Send a DELETE request with a given request header:
    http DELETE {{https://example.com/todos/7}} {{API-Key:foo}}
  • Show the whole HTTP exchange (both request and response):
    http -v {{https://example.com}}
  • Download a file:
    http --download {{https://example.com}}
  • Follow redirects and show intermediary requests and responses:
    http --follow --all {{https://example.com}}

lipo

Tool for handling Mach-O Universal Binaries. More information: https://ss64.com/osx/lipo.html.
  • Create a universal file from two single-architecture files:
    lipo {{path/to/binary_file.x86_64}} {{path/to/binary_file.arm64e}} -create -output {{path/to/binary_file}}
  • List all architectures contained in a universal file:
    lipo {{path/to/binary_file}} -archs
  • Display detailed information about a universal file:
    lipo {{path/to/binary_file}} -detailed_info
  • Extract a single-architecture file from a universal file:
    lipo {{path/to/binary_file}} -thin {{arm64e}} -output {{path/to/binary_file.arm64e}}

gsha384sum

This command is an alias of GNU sha384sum.
  • View documentation for the original command:
    tldr -p linux sha384sum

afinfo

Audio file metadata parser for OS X. Built-in command of OS X. More information: https://ss64.com/osx/afinfo.html.
  • Display info of a given audio file:
    afinfo {{path/to/file}}
  • Print a one line description of the audio file:
    afinfo --brief {{path/to/file}}
  • Print metadata info and contents of the audio file's InfoDictionary:
    afinfo --info {{path/to/file}}
  • Print output in XML format:
    afinfo --xml {{path/to/file}}
  • Print warnings for the audio file if any:
    afinfo --warnings {{path/to/file}}
  • Display help for full usage:
    afinfo --help

open

Opens files, directories and applications. More information: https://ss64.com/osx/open.html.
  • Open a file with the associated application:
    open {{file.ext}}
  • Run a graphical macOS [a]pplication:
    open -a "{{Application}}"
  • Run a graphical macOS app based on the [b]undle identifier (refer to osascript for an easy way to get this):
    open -b {{com.domain.application}}
  • Open the current directory in Finder:
    open .
  • [R]eveal a file in Finder:
    open -R {{path/to/file}}
  • Open all the files of a given extension in the current directory with the associated application:
    open {{*.ext}}
  • Open a [n]ew instance of an application specified via [b]undle identifier:
    open -n -b {{com.domain.application}}


gmkdir

This command is an alias of GNU mkdir.
  • View documentation for the original command:
    tldr -p linux mkdir

llvm-lipo

This command is an alias of lipo.
  • View documentation for the original command:
    tldr lipo

gvdir

This command is an alias of GNU vdir.
  • View documentation for the original command:
    tldr -p linux vdir

gsum

This command is an alias of GNU sum.
  • View documentation for the original command:
    tldr -p linux sum

automountd

An automatic mount/unmount daemon for autofs. Started on demand by launchd. It should not be invoked manually. More information: https://www.manpagez.com/man/8/automountd/.
  • Start the daemon:
    automountd
  • Log more details to syslog:
    automountd -v

gcat

This command is an alias of GNU cat.
  • View documentation for the original command:
    tldr -p linux cat


say

Converts text to speech. More information: https://ss64.com/osx/say.html.
  • Say a phrase aloud:
    say "{{I like to ride my bike.}}"
  • Read a file aloud:
    say --input-file={{filename.txt}}
  • Say a phrase with a custom voice and speech rate:
    say --voice={{voice}} --rate={{words_per_minute}} "{{I'm sorry Dave, I can't let you do that.}}"
  • List the available voices (different voices speak in different languages):
    say --voice="?"
  • Say something in Polish:
    say --voice={{Zosia}} "{{Litwo, ojczyzno moja!}}"
  • Create an audio file of the spoken text:
    say --output-file={{filename.aiff}} "{{Here's to the Crazy Ones.}}"

gsync

This command is an alias of GNU sync.
  • View documentation for the original command:
    tldr -p linux sync

grlogin

This command is an alias of GNU rlogin.
  • View documentation for the original command:
    tldr -p linux rlogin

gsplit

This command is an alias of GNU split.
  • View documentation for the original command:
    tldr -p linux split

look

Look for lines in sorted file. More information: https://manned.org/look.
  • Look for lines which begins with the given prefix:
    look {{prefix}} {{path/to/file}}
  • Look for lines ignoring case:
    look --ignore-case {{prefix}} {{path/to/file}}

java_home

Return a value for $JAVA_HOME or execute command using this variable. More information: https://www.unix.com/man-page/osx/1/java_home.
  • List JVMs based on a specific version:
    java_home --version {{1.5+}}
  • List JVMs based on a specific [arch]itecture:
    java_home --arch {{i386}}
  • List JVMs based on a specific tasks (defaults to CommandLine):
    java_home --datamodel {{Applets|WebStart|BundledApp|JNI|CommandLine}}
  • List JVMs in a XML format:
    java_home --xml
  • Display help:
    java_home --help


gexpand

This command is an alias of GNU expand.
  • View documentation for the original command:
    tldr -p linux expand


gfind

This command is an alias of GNU find.
  • View documentation for the original command:
    tldr -p linux find

defaults

Read and write macOS user configuration for applications. More information: https://ss64.com/osx/defaults.html.
  • Read system defaults for an application option:
    defaults read "{{application}}" "{{option}}"
  • Read default values for an application option:
    defaults read -app "{{application}}" "{{option}}"
  • Search for a keyword in domain names, keys, and values:
    defaults find "{{keyword}}"
  • Write the default value of an application option:
    defaults write "{{application}}" "{{option}}" {{-type}} {{value}}
  • Speed up Mission Control animations:
    defaults write com.apple.Dock expose-animation-duration -float 0.1
  • Delete all defaults of an application:
    defaults delete "{{application}}"

m

Swiss Army Knife for macOS. More information: https://github.com/rgcr/m-cli.
  • Get the battery status:
    m battery status
  • Turn off Bluetooth:
    m bluetooth off
  • List available filesystems for formatting:
    m disk filesystems
  • Enable Dock's auto hide feature:
    m dock autohide YES
  • Disable the firewall:
    m firewall disable

fileicon

Manage custom file and folder icons. More information: https://github.com/mklement0/fileicon.
  • Set a custom icon for a specific file or directory:
    fileicon set {{path/to/file_or_directory}} {{path/to/icon_file.png}}
  • Remove a custom icon from a specific file or directory:
    fileicon rm {{path/to/file_or_directory}}
  • Save the custom icon of a file or directory as a .icns file into the current directory:
    fileicon get {{path/to/file_or_directory}}
  • Test if a specific file or directory has a custom icon:
    fileicon test {{path/to/file_or_directory}}


gcomm

This command is an alias of GNU comm.
  • View documentation for the original command:
    tldr -p linux comm

ggrep

This command is an alias of GNU grep.
  • View documentation for the original command:
    tldr -p linux grep

archey

Simple tool for stylishly displaying system information. More information: https://github.com/joshfinnie/archey-osx.
  • Show system information:
    archey
  • Show system information without colored output:
    archey --nocolor
  • Show system information, using MacPorts instead of Homebrew:
    archey --macports
  • Show system information without IP address check:
    archey --offline

gindent

This command is an alias of GNU indent.
  • View documentation for the original command:
    tldr -p linux indent


ggroups

This command is an alias of GNU groups.
  • View documentation for the original command:
    tldr -p linux groups


screencapture

Utility to take screenshots and screen recordings. More information: https://ss64.com/osx/screencapture.html.
  • Take a screenshot and save it to a file:
    screencapture {{path/to/file.png}}
  • Take a screenshot including the mouse cursor:
    screencapture -C {{path/to/file.png}}
  • Take a screenshot and open it in Preview, instead of saving:
    screencapture -P
  • Take a screenshot of a selected rectangular area:
    screencapture -i {{path/to/file.png}}
  • Take a screenshot after a delay:
    screencapture -T {{seconds}} {{path/to/file.png}}
  • Make a screen recording and save it to a file:
    screencapture -v {{path/to/file.mp4}}

gtee

This command is an alias of GNU tee.
  • View documentation for the original command:
    tldr -p linux tee

sips

Apple Scriptable Image Processing System. Raster/Query images and ColorSync ICC Profiles. More information: https://ss64.com/osx/sips.html.
  • Specify an output directory so that originals do not get modified:
    sips --out {{path/to/out_dir}}
  • Resample image at specified size, Image aspect ratio may be altered:
    sips --resampleHeightWidth {{1920}} {{300}} {{image_file.ext}}
  • Resample image so height and width aren't greater than specified size (notice the capital Z):
    sips --resampleHeightWidthMax {{1920}} {{300}} {{image_file.ext}}
  • Resample all images in a directory to fit a width of 960px (honoring aspect ratio):
    sips --resampleWidth {{960}} {{path/to/images}}
  • Convert an image from CMYK to RGB:
    sips --matchTo "/System/Library/ColorSync/Profiles/Generic RGB Profile.icc" {{path/to/image.ext}} {{path/to/out_dir}}
  • Remove ColorSync ICC profile from an image:
    sips --deleteProperty profile --deleteColorManagementProperties {{path/to/image_file.ext}}

gtouch

This command is an alias of GNU touch.
  • View documentation for the original command:
    tldr -p linux touch

xcodes

Download, install and manage multiple Xcode versions. See also: xcodes runtimes. More information: https://github.com/xcodesorg/xcodes.
  • List all installed Xcode versions:
    xcodes installed
  • List all available Xcode versions:
    xcodes list
  • Select an Xcode version by specifying a version number or a path:
    xcodes select {{xcode-version|path/to/Xcode.app}}
  • Download and install a specific Xcode version:
    xcodes install {{xcode-version}}
  • Install the latest Xcode release and select it:
    xcodes install --latest --select
  • Download a specific Xcode version archive to a given directory without installing it:
    xcodes download {{xcode-version}} --directory {{path/to/directory}}

pbcopy

Copy data from stdin to the clipboard. Comparable to pressing Cmd + C on the keyboard. More information: https://ss64.com/osx/pbcopy.html.
  • Place the contents of a specific file in the clipboard:
    pbcopy < {{path/to/file}}
  • Place the results of a specific command in the clipboard:
    find . -type t -name "*.png" | pbcopy


gbase64

This command is an alias of GNU base64.
  • View documentation for the original command:
    tldr -p linux base64

gb2sum

This command is an alias of GNU b2sum.
  • View documentation for the original command:
    tldr -p linux b2sum

gtail

This command is an alias of GNU tail.
  • View documentation for the original command:
    tldr -p linux tail

gwhich

This command is an alias of GNU which.
  • View documentation for the original command:
    tldr -p linux which

glibtoolize

This command is an alias of GNU libtoolize.
  • View documentation for the original command:
    tldr -p linux libtoolize

plutil

View, convert, validate, or edit property list ("plist") files. More information: https://www.manpagez.com/man/1/plutil/.
  • Display the contents of one or more plist files in human-readable format:
    plutil -p {{file1.plist file2.plist ...}}
  • Convert one or more plist files to XML format, overwriting the original files in-place:
    plutil -convert xml1 {{file1.plist file2.plist ...}}
  • Convert one or more plist files to binary format, overwriting the original files in-place:
    plutil -convert binary1 {{file1.plist file2.plist ...}}
  • Convert a plist file to a different format, writing to a new file:
    plutil -convert {{xml1|binary1|json|swift|objc}} {{path/to/file.plist}} -o {{path/to/new_file.plist}}
  • Convert a plist file to a different format, writing to stdout:
    plutil -convert {{xml1|binary1|json|swift|objc}} {{path/to/file.plist}} -o -

scutil

Manage system configuration parameters. Necessitates to be root when setting configuration. More information: https://ss64.com/osx/scutil.html.
  • Display DNS Configuration:
    scutil --dns
  • Display proxy configuration:
    scutil --proxy
  • Get computer name:
    scutil --get ComputerName
  • Set computer name:
    sudo scutil --set ComputerName {{computer_name}}
  • Get hostname:
    scutil --get HostName
  • Set hostname:
    scutil --set HostName {{hostname}}


gchgrp

This command is an alias of GNU chgrp.
  • View documentation for the original command:
    tldr -p linux chgrp

gshuf

This command is an alias of GNU shuf.
  • View documentation for the original command:
    tldr -p linux shuf

xcodebuild

Build Xcode projects. More information: https://developer.apple.com/library/archive/technotes/tn2339/_index.html.
  • Build workspace:
    xcodebuild -workspace {{workspace_name.workspace}} -scheme {{scheme_name}} -configuration {{configuration_name}} clean build SYMROOT={{SYMROOT_path}}
  • Build project:
    xcodebuild -target {{target_name}} -configuration {{configuration_name}} clean build SYMROOT={{SYMROOT_path}}
  • Show SDKs:
    xcodebuild -showsdks

gdnsdomainname

This command is an alias of GNU dnsdomainname.
  • View documentation for the original command:
    tldr -p linux dnsdomainname

wc

Count lines, words, or bytes. More information: https://ss64.com/osx/wc.html.
  • Count lines in file:
    wc -l {{path/to/file}}
  • Count words in file:
    wc -w {{path/to/file}}
  • Count characters (bytes) in file:
    wc -c {{path/to/file}}
  • Count characters in file (taking multi-byte character sets into account):
    wc -m {{path/to/file}}
  • Use stdin to count lines, words and characters (bytes) in that order:
    {{find .}} | wc

ed

The original Unix text editor. See also: awk, sed. More information: https://www.gnu.org/software/ed/manual/ed_manual.html.
  • Start an interactive editor session with an empty document:
    ed
  • Start an interactive editor session with an empty document and a specific [p]rompt:
    ed -p '> '
  • Start an interactive editor session with an empty document and without diagnostics, byte counts and '!' prompt:
    ed -s
  • Edit a specific file (this shows the byte count of the loaded file):
    ed {{path/to/file}}
  • Replace a string with a specific replacement for all lines:
    ,s/{{regular_expression}}/{{replacement}}/g

gln

This command is an alias of GNU ln.
  • View documentation for the original command:
    tldr -p linux ln

mdls

Display the metadata attributes for a file. More information: https://ss64.com/osx/mdls.html.
  • Display the list of metadata attributes for file:
    mdls {{path/to/file}}
  • Display a specific metadata attribute:
    mdls -name {{attribute}} {{path/to/file}}

dark-mode

Control macOS dark mode. More information: https://github.com/sindresorhus/dark-mode.
  • Toggle dark mode (turn it on if it's currently off, off if it's currently on):
    dark-mode
  • Turn dark mode on:
    dark-mode on
  • Turn dark mode off:
    dark-mode off
  • Check if dark mode is on:
    dark-mode status

stat

Display file status. More information: https://ss64.com/osx/stat.html.
  • Show file properties such as size, permissions, creation and access dates among others:
    stat {{path/to/file}}
  • Same as above but verbose (more similar to Linux's stat):
    stat -x {{path/to/file}}
  • Show only octal file permissions:
    stat -f %Mp%Lp {{path/to/file}}
  • Show owner and group of the file:
    stat -f "%Su %Sg" {{path/to/file}}
  • Show the size of the file in bytes:
    stat -f "%z %N" {{path/to/file}}

gtimeout

This command is an alias of GNU timeout.
  • View documentation for the original command:
    tldr -p linux timeout

gpwd

This command is an alias of GNU pwd.
  • View documentation for the original command:
    tldr -p linux pwd

locate

Find filenames quickly. More information: https://manned.org/locate.
  • Look for pattern in the database. Note: the database is recomputed periodically (usually weekly or daily):
    locate "{{pattern}}"
  • Look for a file by its exact filename (a pattern containing no globbing characters is interpreted as *pattern*):
    locate */{{filename}}
  • Recompute the database. You need to do it if you want to find recently added files:
    sudo /usr/libexec/locate.updatedb

sntpd

An SNTP server. It should not be invoked manually. More information: https://linux.die.net/man/8/snmpd.
  • Start the daemon:
    sntpd
  • Overwrite existing state with the local clock (stratum 1), for running a master/primary server, without synchronizing with another (higher stratum) server:
    sntpd -L
  • Use a custom file for the SNTP state:
    sntpd -z {{path/to/state.bin}}

glogname

This command is an alias of GNU logname.
  • View documentation for the original command:
    tldr -p linux logname

gbasename

This command is an alias of GNU basename.
  • View documentation for the original command:
    tldr -p linux basename

gtest

This command is an alias of GNU test.
  • View documentation for the original command:
    tldr -p linux test


textutil

Used to manipulate text files of various formats. More information: https://ss64.com/osx/textutil.html.
  • Display information about foo.rtf:
    textutil -info {{path/to/foo.rtf}}
  • Convert foo.rtf into foo.html:
    textutil -convert {{html}} {{path/to/foo.rtf}}
  • Convert rich text to normal text:
    textutil {{path/to/foo.rtf}} -convert {{txt}}
  • Convert foo.txt into foo.rtf, using Times 10 for the font:
    textutil -convert {{rtf}} -font {{Times}} -fontsize {{10}} {{path/to/foo.txt}}
  • Load all RTF files in the current directory, concatenates their contents, and writes the result out as index.html with the HTML title set to "Several Files":
    textutil -cat {{html}} -title "Several Files" -output {{path/to/index.html}} *.rtf

glink

This command is an alias of GNU link.
  • View documentation for the original command:
    tldr -p linux link

ghostname

This command is an alias of GNU hostname.
  • View documentation for the original command:
    tldr -p linux hostname

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.