Linux distro name + network manager

It turned out that I needed to check via ssh the OS installed on a certain client. You could say “why you need to do that? don’t you know what you have?”. And you are right. But since I’m not the only root around, sometimes I need to know by myself.

Everybody know the uname -a and uname -r commands. If you don’t know, check them out now. But where is the distro information stored? Here on nixcraft they propose several methods. The Method #2:
$ lsb_release -a
gives me a command not found output. I look for a “default” solution, that is, one that works without installing extra packages. So I try Method #1

cat /etc/*-release
CentOS Linux release 7.3.1611 (Core) 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.3.1611 (Core) 
CentOS Linux release 7.3.1611 (Core)

That is, definitely, everything I wanted. The same command gives of course different output on other systems. On a RH system, the output is much shorter:

cat /etc/*-release
Red Hat Enterprise Linux Server release 6.8 (Santiago)
Red Hat Enterprise Linux Server release 6.8 (Santiago)

The other annoying issue that I found on machines that were not configured by me is network devices not managed. That is, devices you know they are there but they don’t seem to be available. The answer I found on the ask ubuntu forum works also fine for my device. I quote:

in a terminal:

sudo nano /etc/NetworkManager/NetworkManager.conf

change the line managed=false to managed=true. Save, stop and start network manager,  by sudo service network-manager restart, or even better, reboot. Your false device is now true. AND More stupid tricks in the coming days  😛

Advertisements

About bitsanddragons

A traveller, an IT professional and a casual writer
This entry was posted in bits, hardware, linux. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s