Tips and tricks

Useful commands in Mac OS X Terminal
How to add to PATH variable

The name of the PATH variable is case-sensitive and must be all-uppercase.

export PATH=$PATH:/folder/you/want

note – the first one is more important

note2To verify your change, run:

echo $PATH
Listing all the groups to which a user belongs in macOS
id -Gn [user]
find files with a specific name in a directory
find /opt -name httpd.conf
see which files are preventing shutdown
pmset -g assertions
see scheduled tasks
launchctl list | grep com.local.sendrequest
close specific task
pkill -f "ng serve"
close task at port
lsof -ti:3514 | xargs kill -9 2>/dev/null || echo "No processes on port"
connect to ssh server
SSH
generate ssh key
ssh-keygen -t ed25519 -C "your_email@example.com"
connect to ssh server

if you have an authorised .ssh key in the ~/.ssh folder, you can do

ssh {{user}}@{{ip-or-domain}}
restart ssh server

if you have modified config or something, you can do

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_tfs
show hidden files mac

open terminal and write

defaults write com.apple.finder AppleShowAllFiles YES
disable mouse acceleration

open terminal and write

defaults write -g com.apple.mouse.scaling -integer -1

you can restart the terminal after that

restart airdrop

in case AirDrop is not working on your Mac:

killall sharingd

Leave a comment

Your email address will not be published

{"type":"main_options","images_arr":"'#ffffff'","bg_slideshow_time":"0","site_url":"https:\/\/digitalzoomstudio.net","theme_url":"https:\/\/digitalzoomstudio.net\/wp-content\/themes\/qucreative\/","is_customize_preview":"off","gallery_w_thumbs_autoplay_videos":"off","base_url":"https:\/\/digitalzoomstudio.net"}