Skip to content

Instantly share code, notes, and snippets.

@Lumbe
Last active August 28, 2017 20:21
Show Gist options
  • Save Lumbe/24abf99cdfd904d803c0499a7db38973 to your computer and use it in GitHub Desktop.
Save Lumbe/24abf99cdfd904d803c0499a7db38973 to your computer and use it in GitHub Desktop.
Useful commands for Ubuntu

1. Get a human-readable ascending list of the sizes of files and subdirectories in your current directory (-sh will sumarize the current directory size)

$ du -sh * | sort -h

2. Check Ubuntu version

$ lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:        14.04
Codename:       trusty

3. Enable read-write in recovery mode

mount -o rw,remount /

4. Extract file (tar.gz)

$ tar -xf file.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment