Linux Online
[ Register ]

[ Applications ]
[ Documentation ]
[ Distributions ]
[ Download Info ]
[ General Info ]
[ Book Store ]
[ Courses ]
[ News ]
[ People ]
[ Hardware ]
[ Vendors ]
[ Projects ]
[ Events ]
[ User Groups ]
[ User Area ]

Building Embedded Linux Systems

[ About Us ]
[ Home Page ]
[ Advertise ]

Getting Started with Linux - Lesson 10

'whoami'

whoami is a nice little program that tells you who you are, just in case you didn't know already. You amnesia victims are in luck! Actually it tells you who you are in terms of how Linux understands who you are, that is to say, your user name. So if your user name is bob and you type whoami you'll get: bob This comes in handy if you switch terminals a lot and work as a different user. You may, in terms of computer use anyway, forget who you are!

'whatis'

To show you how to use the 'whatis' command 'whatis' is a command so you can find out what a program does. If you explore your Linux system, you will find a lot of programs and you may not know what they do. You would simply type: whatis grep for example, and you would get this:

grep (1) - print lines matching a pattern

Linux is good, but it's not all-knowing, so if you type: whatis orange juice You will get this message:

orange: nothing appropriate.
juice: nothing appropriate.

basically telling you that Linux has no idea what orange juice is

'whereis'

whereis is a nice command for finding other commands or programs. If you decide to download any program from the internet, that program may need other programs in order to work. If you want to know whether or not you have it, you can type: whereis [program name] and find out.

If you wanted to find out if you have the 'pico' editor and where it is, you would type:

whereis pico

and you may get this:

pico: /usr/bin/pico /usr/man/man1/pico.1.gz

It shows you where the command is as well as the location of its manual file.

whereis isn't designed to find people, so if you type

whereis Harry

Linux is just going to say Harry:

'which'

To show you another tool for locating programs 'which' is similar to 'whereis'. It will give you the location of a program. At times, a program may not find another program it needs to make it run. It will need to know its location or "path". For example, a program may need Java to run it but thinks its in another place. You would simply type:

which java

and Linux will inform you of its location

/usr/lib/java/bin/java

This is a handy command because some locations of programs vary from one version of Linux to the next. A software developer may have designed his/her program to access Java, for example, from a different location. As Open Source software will always let you modify configuration files to get your program working according to your needs, you can get the program to work for your system.

[Previous] [Next]




Comments: feedback (at) linux.org
Advertising: banners (at) linux.org
Copyright Linux Online Inc.
Compilation ©1994-2008 Linux Online, Inc.
All rights reserved.