---
title: "[![](/figures/icons-and-logos/bash-logo-colored.svg){style='height:1em;vertical-align:bottom;padding-right:0.1rem;padding-bottom:0.1em'} Terminal Cheatsheet]{style='display:inline-block'}"
author: "Dr Jon Cardoso-Silva"
date: "2025-07-14"
description: "A quick reference guide for common terminal commands."
title-nav: "4️⃣ Terminal Cheatsheet"
order-nav: 4
image: /figures/dalle/dalee_futuristic_computers_hidden_inside_clouds_in_the_style_of_Studio_Ghibli_alternative.png
categories: [terminal, cheatsheet, guide]
format:
  html:
    css: /css/custom_style.css
---



# Zsh/Bash ([![](/figures/icons-and-logos/apple_logo.svg){style='height:0.9em;vertical-align:bottom;padding-right:0.1rem;padding-bottom:0.1em'} Mac or ![](/figures/icons-and-logos/linux_logo.svg){style='height:0.9em;vertical-align:bottom;padding-right:0.1rem;padding-bottom:0.1em'} Linux]{style='display:inline-block'})

Since everyone in this course will be using the same cloud environment on Nuvolos, we will all be using the same `bash` shell.

## Navigation

- `cd [directory]`: Change directory
- `ls`: List files and directories
- `pwd`: Print working directory
- `mkdir [directory]`: Create a new directory
- `touch [file]`: Create a new file
- `rm [file]`: Remove a file
- `rm -r [directory]`: Remove a directory and its contents

## File Operations

- `cat [file]`: Display the contents of a file
- `cp [source] [destination]`: Copy a file or directory
- `mv [source] [destination]`: Move or rename a file or directory
- `grep [pattern] [file]`: Search for a pattern in a file
- `chmod [permissions] [file]`: Change file permissions

## Process Management

- `ps`: List running processes
- `kill [PID]`: Terminate a process
- `top`: Display system activity and process information

# PowerShell ([![](/figures/icons-and-logos/windows_logo.svg){style='height:0.9em;vertical-align:bottom;padding-right:0.1rem;padding-bottom:0.1em'} Win]{style='display:inline-block'})

You will not need to use PowerShell in this course, but it is the equivalent of `bash` on Windows. Here are some of the equivalent commands for your reference.

## Navigation

- `cd [directory]`: Change directory
- `dir`: List files and directories
- `pwd`: Print working directory
- `mkdir [directory]`: Create a new directory
- `ni [file]`: Create a new file
- `rm [file]`: Remove a file
- `rm -r [directory]`: Remove a directory and its contents

## File Operations

- `gc [file]`: Get the contents of a file
- `cp [source] [destination]`: Copy a file or directory
- `mv [source] [destination]`: Move or rename a file or directory
- `sls [pattern] [file]`: Search for a pattern in a file
- `icacls [file] /grant [permissions]`: Change file permissions

## Process Management

- `ps`: List running processes
- `kill [PID]`: Terminate a process
- `tasklist`: Display running tasks 