In order to know what version of OS you are running, you can make use of the below commands on the Bash Terminal based on your operating system.
Debian/Ubuntu Linux:
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
CentOS/RHEL Linux:
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)
Other Linux/Unix-Like Systems:
# uname -a
Linux b9fc21f2fc40 5.15.49-linuxkit-pr #1 SMP PREEMPT Thu May 25 07:27:39 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
macOS:
# uname -a
14.0

-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Bash,
- Bash Hello World! Script Tutorial
- How to run bash command in background
- How to create new user account in Windows bash
- How to Compare Strings in Bash
- Bash: Allow Command to Fail without exiting Script
- Fix bash: script.sh: Permission denied Error
- Bash getopts Command Example
- How to fix bash ping command not found error
- How to add NewLine Character in Bash Script String
- How to Echo Bash Command to a File
- Bash Command to Find String in a File
- How to open new Terminal using Bash Command
- Bash How to Save Output of a Command to a Variable
- Download a SSL Certificate from a URL in Terminal
- Bash Command to Check IP Address
- Know Bash shell version command
- Bash Command To Check If File Exists
- How to run a Command in Bash Script
- How to Compare two Files in Bash Shell
- How to check if a variable is set in Bash Script or Not
- Convert String from uppercase to lowercase in Bash
- How to see Created Accessed Modified and Changed dates of a file using bash terminal command
- Bash Command To Get Current Time
- Bash command to List Files
- Fix: bash: syntax error near unexpected token
More Posts:
- List of PowerShell Function Commands for Mac - Powershell
- Fix: ValueError: operands could not be broadcast together with shapes [Python numpy] - Python
- Check version of pip package installer for Python - Python
- Fix: type argument is not within bounds of type-variable T - Java
- Truncate table using Java JDBC Example - Java
- Python: pandas merge DataFrames on Common Column - Python
- Hide Keyboard Text Input Icon on macOS Ventura Menu Bar - MacOS
- VS Code Remove Unused Imports Keyboard Shortcut - HowTos