Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| linux:linux-tutorials:sticky-notes [2024/12/25 14:05] – [View CPU information] Zyzonix | linux:linux-tutorials:sticky-notes [2024/12/25 14:12] (current) – removed Zyzonix | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Sticky Linux notes ===== | ||
| - | This page keeps all Linux related quick commands and shortcuts, as well as useful other information. | ||
| - | ==== Get OS information ==== | ||
| - | Get OS information from ''/ | ||
| - | |||
| - | Example: Debian: | ||
| - | <code bash> | ||
| - | PRETTY_NAME=" | ||
| - | NAME=" | ||
| - | VERSION_ID=" | ||
| - | VERSION=" | ||
| - | VERSION_CODENAME=bullseye | ||
| - | ID=debian | ||
| - | HOME_URL=" | ||
| - | SUPPORT_URL=" | ||
| - | BUG_REPORT_URL=" | ||
| - | </ | ||
| - | |||
| - | Import this to a bash script via: | ||
| - | |||
| - | The var '' | ||
| - | <code bash> | ||
| - | if [ -f / | ||
| - | . / | ||
| - | ID=$ID | ||
| - | fi | ||
| - | </ | ||
| - | |||
| - | Or use '' | ||
| - | <code bash> | ||
| - | //installed via: '' | ||
| - | |||
| - | Sourced from: [[https:// | ||
| - | ------ | ||
| - | ==== View CPU information ==== | ||
| - | |||
| - | To view information about the CPU use | ||
| - | <code bash>cat / | ||
| - | ------ | ||
| - | |||
| - | ==== Create .img on Linux CLI ==== | ||
| - | It's quite simple to create an image of a disk, for example an SD card, therefore use the following command: | ||
| - | <code bash>dd if=/ | ||
| - | |||
| - | The ''/ | ||
| - | <code bash> | ||
| - | For example it can be ''/ | ||
| - | Remind that using this method will include also empty parts. An image of a 32 GB SD card will later have a size of 32 GB although for example 16 GB are unused. | ||
| - | |||
| - | ----- | ||
| - | |||
| - | ==== Allow users to write to specific directory ==== | ||
| - | |||
| - | To allow any user to read/write a directory adjust permissions with: | ||
| - | |||
| - | <code bash> | ||
| - | |||
| - | '' | ||
| - | |||
| - | //Sourced from [[https:// | ||