Skip to content

Linux Command Line Cheatsheet

Jason Lewis edited this page May 29, 2024 · 7 revisions

Up

General

Put Linux in Debug Mode

set -x

Take Linux Out Of Debug Mode

set +x

Refresh .bashrc

source ~/.bashrc

File Management

Copy Directory and Contents

cp -r <src> <dest>

Delete Directory and Contents

rm -d -r <directory>

View Drive Usage

NOTE: -h outputs in "human-readable" values (GB, MB, etc.)

df -h

General

View CPU Usage

top

Apt

Prevent Updating of Package

sudo apt-mark hold <package name>

Re-enable Updating of Package

sudo apt-mark unhold <package name>
Clone this wiki locally