More talk about commands and programs

More talk about commands and programs

For the new User, it might be confusing finding out what files are programs and which are not. Under MS-DOS or Windows, all executable files are named *.exe, *.com or *.bat . This is not the case under Linux (or other Unices). Instead, files are executable if they have the executable bit set in the file rights. Read more about this in the the Section called Dealing with user rights in the filesystem.. This is also the basis for shell scripts about which you can read in the the Section called Shell scripts . Creating a shell script is in brief just a question of deciding what interpreter you want, writing some commands and then execute a chmodcommand to make it executable.

I just installed a program, but now I can't find it. Help!

When you install a program using either some package tool (RPM or DEB for example) or by compiling it by hand it will most often be placed some directory in your path. Se the Section called Environment variables for some discussion about the PATH and other environment variables. This makes it possible for you to execute the program just by writing it's name in a shell.

If the program was a X window system program, chances are great that your package system installed it in the menus of your window manager. Try restarting your windowmanager and browse the menus to see if you find the program. It might be there even if it isn't a X program - most programs can be run in a xterm.

I don't remember the name of a command. Help!

Since Linux is used by users that know that computers can do a lot of things more convenient for the user. One example of this is the command completion feature most shells have. For example, pressing a single letter and one or two tabs will in most shells show you all commands in your path that begins with that letter. This makes it easier to find a command that you know start with some characters.

The manual pages are also very helpful. Try running the apropos command with some word as parameter. apropos file for example will show you all the commands that have to do with files in some way. That's a lot of commands..