Friday, September 26, 2008

3 Methods to Figure Out Which Version of Linux is Running

There are several ways of figuring out a correct version of the linux OS you are running. Probably the easiest is to reboot and watch what displays on start-up. If that option is not available then you can try the following:

Method #1

dmesg | grep "Linux Version"


The dmesg command contains the kernel buffer, which can be rather extensive. Which is why it is important to grep the command. The Kernel buffer wont always list the linux version, so you may want to play with the command, like grep "linux" or grep "ver".

Method #2

cat /proc/version


This method looks at a file with the version listed in it. This may be especially helpful on redhat boxes that may be harder to find. Though there still may be some confusion in the case of systems based on redhat (e.g. CentOS, Fedora)

Method #3

uname -a


The uname command may possibly tell you what you need to know, however often times it may just report the kernel version.


Conclusion

Hopefully these commands will help locate the information you need. There are a few other ways to check that may just be a matter of logical troubleshooting or example which type of package management is available? Good Luck!


References:

http://www.novell.com/coolsolutions/qna/11175.html
http://en.wikipedia.org/wiki/Dmesg
http://www.programmersheaven.com/mb/Linux/313775/313775/how-to-check-linux-version-from-command-line/?S=B20000
http://www.linuxforums.org/forum/redhat-fedora-linux-help/35851-find-redhat-linux-version.html

Wednesday, September 24, 2008

Mount an NTFS Partition as read/write in Suse10+

By default SUSE Enterprise 10 with sp2 does not allow writing to an NTFS partition. However the automount may have detected and mounted the various partitions for you as ro (Read-only).

To start, we need to install an add-on which will allow for write capabilities. For this I use the built-in package manager Yast. In Yast search for NTFS-3g (or just ntfs and it will show it). Install the package and then onto editing fstab (which determines which drives to mount on bootup).

vim /etc/fstab

If the drive is already mounted then change the NTFS portion to say ntfs-3g.
If not, this is an example and may vary

/dev/sda1 /mnt/windows ntfs-3g defaults 0 0

Next you have a couple options, you can reboot or if that is not an option you can use the mount command.

If the drive is already mounted, use the umount command to unmount the drive, then remount the drive

mount -t ntfs-3g /dev/sda1 /mnt/windows

References:
http://www.ntfs-3g.org/