From 6eaad415a868fc80f5a07e662d91b7ef76b7f205 Mon Sep 17 00:00:00 2001 From: Yuriy Samorodov Date: Sat, 7 Feb 2026 03:59:10 +0400 Subject: [PATCH 1/2] Added some notes to MacOS only section --- README.md | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a1109d58..fe36f08b 100755 --- a/README.md +++ b/README.md @@ -553,13 +553,25 @@ A few examples of piecing together commands: These are items relevant *only* on macOS. +- Default Terminal in MacOS is `zsh`. Although most of the commands listed in this guide will work just fine, please keep in mind some `bash` scripts may through errors or produce unexpected results. + - Package management with `brew` (Homebrew) and/or `port` (MacPorts). These can be used to install on macOS many of the above commands. -- Copy output of any command to a desktop app with `pbcopy` and paste input from one with `pbpaste`. +- Copy output of any command to a file with `pbcopy < file.txt` or `cat file.txt | pbcopy` + +- Paste input from one with `pbpaste`. + +- Count items in clipboard: `pbpaste | wc -l` + +- Strip formatting from clipboard: `pbpaste | pbcopy`. - To enable the Option key in macOS Terminal as an alt key (such as used in the commands above like **alt-b**, **alt-f**, etc.), open Preferences -> Profiles -> Keyboard and select "Use Option as Meta key". -- To open a file with a desktop app, use `open` or `open -a /Applications/Whatever.app`. +- To open a file with a desktop app, use `open -a "Application Name"` or `open -a /Applications/Whatever.app`. + +- To reveal a folder in `Finder`, pleae use `open -R /path/to/file` + +- Show/hide hidden files in Finder: `defaults write com.apple.finder AppleShowAllFiles YES && killall Finder`. - Spotlight: Search files with `mdfind` and list metadata (such as photo EXIF info) with `mdls`. @@ -567,6 +579,24 @@ These are items relevant *only* on macOS. - To get macOS release information, use `sw_vers`. +- Get detailed hardware info with `system_profiler` and `system_profiler SPHardwareDataType for Mac` specs. + +- Check battery status with `pmset -g batt` and power management settings with `pmset -g`. + +- View system logs with `log show` or stream them in real-time with `log stream`. + +- List all running applications with `osascript -e 'tell application "System Events" to get name of every process whose background only is false'`. +Force quit applications from terminal with `killall [AppName]` or `pkill`. + +- Flush DNS cache with `sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder`. + +- View active network connections with `netstat -an` or `lsof -i`. + +- Get current Wi-Fi network with `networksetup -getairportnetwork en0`. + +- Scan available Wi-Fi networks: `/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s`. + + ## Windows only These items are relevant *only* on Windows. From f2fc27f6cccd7e586850b76f0dc2688d43e6faaa Mon Sep 17 00:00:00 2001 From: Yuriy Samorodov Date: Sat, 7 Feb 2026 04:02:47 +0400 Subject: [PATCH 2/2] Fixed a missed bullet in MacOS section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fe36f08b..dcdce11d 100755 --- a/README.md +++ b/README.md @@ -586,7 +586,7 @@ These are items relevant *only* on macOS. - View system logs with `log show` or stream them in real-time with `log stream`. - List all running applications with `osascript -e 'tell application "System Events" to get name of every process whose background only is false'`. -Force quit applications from terminal with `killall [AppName]` or `pkill`. +- Force quit applications from terminal with `killall [AppName]` or `pkill`. - Flush DNS cache with `sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder`.