Command Line: how to update ubuntu, check disk free, free ram, linux, etc.

Learnt:
how to update ubuntu and install stuff using APT – advanced package tool
how to upgrade:

sudo apt-get update

how to install:
apt-get install programName

how to check what linux distribution i’m using:

cat /etc/*-release
//it outputs the contents of any file in the etc folder that ends in “-release”

or uname -a //for mac

how to check free RAM:
free -h
// -h means output in human numbers like gigabytes

how to check what computer i’m using:
cat /proc/cpuinfo
// must enter the first / because it means find from root folder, not the current folder.

how much space available on the system:
df -h
//disk free, -h human-readable

how much space files/folders take up on the system:
sudo du / -hd1
//disk usage from / root folder, in human-readable, depth 1 level down.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s