-
Notifications
You must be signed in to change notification settings - Fork 0
NPM & Terminal
kitiya edited this page Jun 21, 2020
·
3 revisions
npm init
npm list for local packages or npm list -g for globally installed packages.
npm list // for local packages
npm list -g // for global packages
npm list --depth=0 // view packages without their dependencies
MAC Terminal Commands Cheat Sheet
| COMMAND | DESC |
|---|---|
Tab |
Auto-complete file and folder names |
Ctrl + A |
Go to the beginning of the line you're currently typing on |
Ctrl + E |
Go to the end of the line you're currently typing on |
Ctrl + L |
Clear the screen |
Ctrl + C |
Kill whatever you're running |
Ctrl + D |
Exit the current shell |
Option + → |
Move cursor one word forward |
Option + ← |
Move cursor one word backward |
Ctrl + _ |
Undo the last command |
| COMMAND | DESC |
|---|---|
/ (Forward Slash) |
Top level directory |
. (Single Period) |
Current directory |
.. (Double Period) |
Parent directory |
~ (Tilde) |
Home directory |
sudo [command] |
Run command with the security privileges of the super user |
nano [file] |
Opens the Terminal editor |
open [file] |
Opens a file |
[command] -h |
Get help about a command |
man [command] |
Show the help manual of the command |
-
ls -
pwd -
cd -
cd.. -
clear -
cd / -
cd ~ -
cd <folder/folder/folder> -
mkdir <folder> -
open <folder> -
touch index.html -
open index.html -
open -a "Sublime Text" index.html -
rm <file> -
rm -r <folder>
-
zsh: command not found after moving over tozshfollowing the Catalina upgrade - Got the error above when running
$ nvm --versioncommand,
- Step 1 - the
~/.zshrcfile need add some config:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion
- Step 2 - Run the command below:
$ source ~/.zshrc
Note: GitHub: NVM