Skip to content

Instantly share code, notes, and snippets.

@dariahervieux
Last active November 5, 2023 10:26
Show Gist options
  • Save dariahervieux/38da8ce5788ba13460576e3867d885fc to your computer and use it in GitHub Desktop.
Save dariahervieux/38da8ce5788ba13460576e3867d885fc to your computer and use it in GitHub Desktop.
Cheat-cheet: Linux useful commands

Linux Cheat-sheet

OS Details

Get distribution details:

$ cat /etc/*-release

Disk usage

Show information about the file system, print sizes in powers of 1024 (e.g., 1023M):

$ df -h

Summarize disk usage of the set of files (FILE argument), recursively for directories, print sizes in human readable format (e.g., 1K 234M 2G);

$ du -h [FILE]

Find a package of the utility

Using dpkg :

$  dpkg -S `which [UTILITY_NAME]`

Using apt-cache search :

$ sudo apt-cache search [UTILITY_NAME]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment