Sunday, October 13, 2019

How to know the OS environment after login using ssh

It is pretty easy

Open the terminal application (bash shell)
For remote server login using the ssh: ssh user@server-name
Type any one of the following command to find os name and version in Linux:

cat /etc/os-release
lsb_release -a
hostnamectl
Type the following command to find Linux kernel version:
uname -r

This gives output like the below

NAME="Ubuntu"
VERSION="17.10 (Artful Aardvark)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 17.10"
VERSION_ID="17.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=artful
UBUNTU_CODENAME=artful


References:
https://www.cyberciti.biz/faq/how-to-check-os-version-in-linux-command-line/


No comments:

Post a Comment