Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:linux-tutorials:sticky-notes [2024/02/26 09:05] – ↷ Page name changed from linux:linux-tutorials:sticky_notes to linux:linux-tutorials:sticky-notes Zyzonixlinux: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 ''/etc/os-release''. 
- 
-Example: Debian: 
-<code bash> 
-PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" 
-NAME="Debian GNU/Linux" 
-VERSION_ID="11" 
-VERSION="11 (bullseye)" 
-VERSION_CODENAME=bullseye 
-ID=debian 
-HOME_URL="https://www.debian.org/" 
-SUPPORT_URL="https://www.debian.org/support" 
-BUG_REPORT_URL="https://bugs.debian.org/" 
-</code> 
- 
-Import this to a bash script via: 
- 
-The var ''ID'' is then ''debian'': 
-<code bash> 
-if [ -f /etc/os-release ]; then 
-  . /etc/os-release 
-  ID=$ID 
-fi 
-</code> 
- 
-Sourced from: [[https://unix.stackexchange.com/questions/6345/how-can-i-get-distribution-name-and-version-number-in-a-simple-shell-script|stackexchange.org]] 
------- 
-==== View CPU information ==== 
- 
-To view information about the CPU use 
-<code bash>cat /proc/cpuinfo</code> 
------- 
-==== Allow users to write to specific directory ==== 
- 
-To allow any user to read/write a directory adjust permissions with: 
- 
-<code bash>chmod -R 0777 /path/to/dir</code> 
- 
-''-R'' sets the permissions recursively.  
- 
-//Sourced from [[https://superuser.com/questions/126073/chmod-to-allow-read-and-write-permissions-for-directory|superuser.com - Chmod to allow read and write permissions]]/ 
  • linux/linux-tutorials/sticky-notes.1708934715.txt.gz
  • Last modified: 2024/02/26 09:05
  • by Zyzonix