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

To 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 3514"
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'","enable_ajax":"off","soundcloud_apikey":"","bg_isparallax":"off","bg_slideshow_time":"0","bg_transition":"none","site_url":"https:\/\/digitalzoomstudio.net","theme_url":"https:\/\/digitalzoomstudio.net\/wp-content\/themes\/qucreative\/","blur_ammount":"26","width_column":"50","width_section_bg":"","width_gap":"30","border_width":"0","border_color":"#ffffff","translate_cancel_comment":"Cancel reply","translate_leave_a_comment":"Leave a comment","translate_leave_a_comment_to":"Leave a comment to","is_customize_preview":"off","width_blur_margin":"30","gallery_w_thumbs_autoplay_videos":"off","content_enviroment_opacity":"30","menu_enviroment_opacity":"70","base_url":"https:\/\/digitalzoomstudio.net"}
{"type":"darkfull"}