Tips and tricks

Useful commands in Mac OS X Terminal
Posted on August 15 2023 / in Tips
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
note2 – 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"
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
create a local dev Apache Mysql PHP Setup on Mac OS X - add XDebug
When starting bash / zsh rc which files can I config
Recent Comments
- admin on Vimeo Thumbnail Generator
- Robert Moeck on Vimeo Thumbnail Generator
- Rainer on Vimeo Thumbnail Generator
- Video Gallery WordPress Plugin /w YouTube, Vimeo, Facebook pages | Berita Online on Vimeo Thumbnail Generator
- Use Browserify Globally as Watcher in PhpStorm [ add Babelify ] – Digital Zoom Studio on Setup a .babelrc in your user directory