User Tools

Site Tools


linux_notes

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
linux_notes [2023/01/03 21:17] – [tasks] rajulinux_notes [2023/09/24 15:33] – [what is my OS?] raju
Line 3: Line 3:
   * [[du on month end dates]]   * [[du on month end dates]]
   * [[change the default shell]]   * [[change the default shell]]
-  * [[which shell am I using]]+  * [[Which shell am I using | Which shell am I using?]] 
 +  * [[Difference between SHELL and 0 | What is the difference between \$SHELL and \$0?]] 
 + 
 +==== what is my OS? ==== 
 +<code> 
 +awk -F= '$1=="ID" {print $2}' /etc/os-release 
 +</code> 
 + 
 +Sample run: 
 +<code> 
 +% cat /etc/os-release 
 +PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" 
 +NAME="Debian GNU/Linux" 
 +VERSION_ID="12" 
 +VERSION="12 (bookworm)" 
 +VERSION_CODENAME=bookworm 
 +ID=debian 
 +HOME_URL="https://www.debian.org/" 
 +SUPPORT_URL="https://www.debian.org/support" 
 +BUG_REPORT_URL="https://bugs.debian.org/" 
 +</code> 
 + 
 +<code> 
 +% awk -F= '$1=="ID" {print $2}' /etc/os-release      
 +debian 
 +</code> 
 + 
 +Ref: 
 +  * I first came across it in https://github.com/trimclain/.dotfiles/blob/main/Makefile
  
 ==== last reboot times ==== ==== last reboot times ====
linux_notes.txt · Last modified: 2023/09/24 15:33 by raju