Thursday, March 18, 2010

Linux: meet this stranger

One of my colleagues is taking care of the virtualization of our servers; during this process he ran into the linux box which has happily worked as a cvs server for years without even needing a single reboot. Ok I'm exaggerating: when we changed the power lines we did have to turn it off for some minutes.

Now, what does a Redmond sympathizer do when he meets the penguin? he gets lost, of course! Now, I cannot say I know linux like the back of my hand (I don't even know my hand like the back of my hand), but at least I think I can go this far, so I thought to post just a small reminder for everyone out there in his situation.

First things first, can our linux box be virtualized with the conversion software we are using? for this we need to know which distro we're running:
me@mybox:~$ cat /etc/issue
Ubuntu 7.10 \n \l
to get more information we could have checked another file
me@mybox:~$ cat /etc/lsb_release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"
Next obstacle, the kernel version. For this we have the uname command, with his different switches (uname just says Linux, and I guess even your Windows lovers knew that): -r shows the kernel release, -v the kernel version, -o the operating system. To see them all use the -a switch:
me@mybox:~$ uname -a
Now, about network interfaces... you can use
me@mybox:~$ ifconfig
to get the basic informations, remembering to add the -a switch if you also want to display informations about inactive interfaces. And the default gateway? you can use
me@mybox:~$ route
OMG we are forgetting DNSs... well you can check for nameserver entries in the resolv.conf file:
me@mybox:~$ cat /etc/resolv.conf
To get more or less all these informations gathered together you can check the interfaces file:
me@mybox:~$ cat /etc/network/interfaces

Not very deep, right? nevertheless somebody might find it useful ;-)

No comments: