DEV Community

theBridge2
theBridge2

Posted on • Updated on

Basic Mac development setup

All of my development has been on a windows machine to this point having only casually used my Mac for 10+ years.

Even with all that casual experience, I have been tripping up a lot. Here are the key things that got me going developing on a Mac.

Keyboard basics

Using a windows keyboard for now.

Action Keys
Command button Windows key
Home command + left arrow
End command + right arrow
move cursor one word at a time Alt + Arrow
show applications/desktops Control+Up
Screenshot entire desktop Shift + Cmd + 3
Screenshot portion of screen Shift + Cmd + 4 (+drag cross hair & make a box)
Copy command + C
Cut command + X
Paste command + V

More on screenshots
https://support.apple.com/en-us/HT201361

Vscode install

https://code.visualstudio.com/docs/setup/mac

Vscode permissions

VS Code won't let you use the terminal until you do this:

OS Settings>Security and privacy>Privacy tab, Click checkbox "documents folder" under Vscode icon.

Command line basics

Command Description
pwd present working directory
ls show directory contents
ls -a show all files and directories including hidden ones.
ls -l show ownership and permissions
find . -name 'mystring*' find file name containing a string.
which <app name> figure out if and where an application is installed. ex: Is brew installed? % which brew

Homebrew Mac/Linux Installer

"The Missing Package Manager for macOS (or Linux)"
https://brew.sh/

Command Description
brew list list all applications installed with homebrew
brew install install an application

Environment Variables and path

Command Description
env See all environment variables
echo $PATH See just the path variable

Add application temporarily to PATH variable, so it works right away (ex: postgres):

export PATH="$PATH:/Applications/Postgres.app/Contents/Versions/12/bin"
Enter fullscreen mode Exit fullscreen mode

Add application permanently to PATH variable, so it works after restarting the terminal and stays:

  • Open your bash profile file at $HOME/.bash_profile with: $ vi ~/.bash_profile
  • At the end of the bash profile, add the line:
export PATH="$PATH:/Applications/Postgres.app/Contents/Versions/12/bin"
Enter fullscreen mode Exit fullscreen mode

Hope some find this useful. Plenty more to add I'm sure.

Top comments (0)