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 [2022/12/26 08:05] – [last reboot times] rajulinux_notes [2023/09/24 15:33] – [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 first came across it in https://github.com/trimclain/.dotfiles/blob/main/Makefile
  
 ==== last reboot times ==== ==== last reboot times ====
Line 23: Line 53:
 </code> </code>
  
-{{tag>["reboot history""show year""date format"]}}+{{tag>["reboot history" "show year" "date format"]}}
 ==== ls and mv ==== ==== ls and mv ====
 Sample command Sample command
linux_notes.txt · Last modified: 2023/09/24 15:33 by raju