Entries Tagged 'Linux' ↓
May 12th, 2008 — Linux, Ubuntu
Hi! If you're new here, you may want to subscribe to the Unix Tutorial RSS feed to get regular tips & tricks for all flavors of Unix. Thanks for visiting!
If you tried installing or upgrading Ubuntu recently, you probably noticed that all the storage devices are now using UUID - Universally Unique IDentifiers. I'm not claiming to know everything there is to know about UUIDs, but have become quite comfortable managing them lately, so hopefully this post will help you achieve the same.
What is a UUID exactly?
UUID is a Universally Unique IDentifier. It's a identification code given to each storage device you have on your system, aimed to help you uniquely identify each device no matter what.
Continue reading →
May 1st, 2008 — Linux, RedHat, Solaris, Ubuntu
Showing your processes in a hierarchical list is very useful for confirming the relationship between every process running on your system. Today I'd like to show you how you can get tree-like processes lists using various commands.
April 7th, 2008 — Basic stuff, Linux
Very quick tip for you today, I just see that many of visitors of this block are curious how they can find a directory in Unix - and so here's a command to help you do just that.
Finding directories in Unix
There's nothing better than to employ the find command. As you might remember, among many things, this wonderful tool allows you to search files by their type. Since nearly everything in Unix is a file, this means you can find directories.
Continue reading →
March 31st, 2008 — Advanced topics, Linux, Ubuntu
Many software products, especially the commercial ones, are distributed as 32-bit packages. This means that they won't be installed on your 64-bit system unless you clearly specify that you want to override the architecture dependency.
If you're using Ubuntu or any other Debian based distribution, this post will teach you how to install 32-bit deb packages on your 64-bit OS.
Is it possible to run 32-bit applications on 64-bit OS?
In Unix world, yes: it is quite possible to run 32-bit binaries on 64-bit OS. There should generally be no problem, but there are, as always, a few caveats:
March 24th, 2008 — Basic stuff, Linux, Ubuntu
I see that my Finding Large Files and Directories post is quite popular, yet there are a few more ways to simplify your search for the largest disk space consumers in your Unix system.
Make find command show file sizes
If you remember, the default way a find command reports results includes only the fully qualified (that means including the full path) filenames.
Now, if you look at a task of identifying the largest files, it's great if you can get a list of all the files bigger than some figure your specify, but what would be even better is to include the exact size of each file right into the output of the find command.
March 18th, 2008 — Advanced topics, Linux, RedHat, Ubuntu
You probably know that modern Linux distributions have many things in common. Well, one of the reasons for this is LSB - Linux Standard Base. LSB is a joint project by a number of Linux vendors to standardize the OS environment.
From Linux Standard Base article on Wikipedia:
The goal of the LSB is to develop and promote a set of standards that will increase compatibility among Linux distributions and enable software applications to run on any compliant system. In addition, the LSB will help coordinate efforts to recruit software vendors to port and write products for Linux.
One of the immediate benefits of LSB compliancy is ability to confirm the exact information about your Linux release using the lsb_release command. By exact information I mean the release version, vendor name and most interestingly the codename of your current Linux release.
Continue reading →
December 19th, 2007 — Linux, RedHat
If you're a really curious mind, you won't be satisfied with simply knowing the current release of your RedHat Linux, that's why there's a few more commands you could use to satisfy your interest.
RedHat release
If you simply want to confirm whether you're using a RHEL4, RHEL5 or any of the previous RedHat Linux releases, this is the first place to look:
bash-3.1$ cat /etc/redhat-release
Red Hat Enterprise Linux Client release 5 (Tikanga)
RedHat kernel version and type
Next step is to find out the exact Linux kernel version on your system, and also confirm whether it's 64-bit or not:
bash-3.1$ uname -a
Linux rhserver123 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:14 EST 2007 x86_64 x86_64 x86_64 GNU/Linux
RedHat kernel build
For the most curious ones, here's the last command. Use it to confirm who and when compiled the RedHat kernel you're using, and what gcc compiler was used in the build process.
bash-3.1$ cat /proc/version
Linux version 2.6.18-8.el5 (brewbuilder@ls20-bc1-14.build.redhat.com) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Fri Jan 26 14:15:14 EST 2007
See also:
December 13th, 2007 — Basic stuff, Linux, Ubuntu
visudo is a tool for safely updating the /etc/sudoers file, found in most Linux systems (Ubuntu for example).
Here's what the Ubuntu man page says about it, I think it's a great summary:
visudo edits the sudoers file in a safe fashion, analogous to vipw(8). visudo locks the sudoers file against multiple simultaneous edits, provides basic sanity checks, and checks for parse errors. If the sudoers file is currently being edited you will receive a message to try again later.
Attention: due to the sensitive content of the /etc/sudoers file, you can only run visudo as root.
December 3rd, 2007 — Linux, Solaris
Mounting an ISO image of a CD/DVD before burning it is one of the basic steps to verifying you're going to get exactly the desired result. It's also a neat trick to access files from a CD/DVD image when you only need a file or two and not a whole CD. Why burn it at all when you can access files much quicker and easier by simply mounting the ISO image?
Every Unix OS has a way to access ISO filesystem, and today I'll only give you examples for Linux and Solaris. In both cases, the two things you need for the example to work are the ISO image itself and an available mount point (basically, an empty directory) on your filesystem to mount it under.
Here's how to mount an ISO in Linux:
# mount -o loop /net/server/linux-bootcd.iso /mnt
September 20th, 2007 — Basic stuff, Linux, News, Ubuntu
If you run your Ubuntu system behind a firewall and have to use proxy server for http and ftp access, then your apt-get on a newly installed Ubuntu system will probably not work.
To make it use proxy, simply set the http_proxy environment variable. Once you get it working (try something like apt-get update), you'll probably want to add it to your .bashrc file.