acbrent25
9/2/2017 - 11:48 AM

Basic Bash/Terminal Commands

Basic Bash/Terminal Commands

# Bash / Terminal Commands

These are the basic commands for navigating directories in a Terminal or Git Bash window

### Moving in directories

#### Change Directory

`cd`

#### Change to Root Directory

`cd ~`

#### Move to One Directory Up

`cd ..`


#### View Folders and Files in the Directory

`ls`

#### Show the current Directory

`pwd`

#### Autocomplete a File Name in the Current Directory

Press `tab` key once to autocomplete once you have typed a unique portion of a file name. 

### File Manipulations

#### Make New File

`touch [name of file to create]`

#### Make New Folder

`mkdir [name of directory to create]`

#### Delete file

`rm [name of file to remove]`

#### Delete folder

`rm -r [name of directory to remove]`

### Mac Only

#### Open file or folder (Mac only)

`open [name of file]`

#### Open all files and folder in current directory (Mac only)

`open .`

### PC Only

#### Open file or folder (PC only)

`explorer [name of file]`

#### Open all files and folder in current directory (PC Only)

`explorer .`