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
linux_notes [2022/12/26 08:05] – [last reboot times] rajulinux_notes [2023/09/24 15:33] (current) – [what is my OS?] raju
Line 2: Line 2:
   * [[add numbers on the command line]]   * [[add numbers on the command line]]
   * [[du on month end dates]]   * [[du on month end dates]]
 +  * [[change the default shell]]
 +  * [[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 came across it in https://github.com/trimclain/.dotfiles/blob/main/Makefile
  
 ==== last reboot times ==== ==== last reboot times ====
linux_notes.1672041949.txt.gz · Last modified: 2022/12/26 08:05 by raju