1

(This is all in the command line/prompt) Hi!

So, my problem is MOST BASIC in nature, and it's like this:

If I want, for an example, to install and run 'cowsay' -program, I assume I do it like:

sudo apt-get install cowsay

BUT now, if I just try to use it, like:

cowsay "Cow goes moo"

I get: command not found

So, ok, maybe the program is not installed..?

So I type:

dpkg -L cowsay

And, no, it is installed alright, maybe it's just not registered into some default library cache of programs...(if that even is a thing)?

In short, I have no idea how to proceed. The objects listed via dpkg are a lot of files with .cow -format, a few .gz -packages and a README file, aka no .exe .bin executables that I can find. The readme file has, as far as I can tell, nothing of use. It's just copyright information and short history of the program.

Thank you for your time! :)

George Udosen
  • 36,677
Antenni
  • 11

1 Answers1

3

Generally when you install a program, you will be able to run it from the command line by typing the name of the program installed. Note that this name will not always match the name of the package (e.g. alsa-tools provides as10k1, hda-verb, sbiload and us428control).

As discussed in the comments by George and Terrance, the program must also be in your PATH variable so that you don't require the full path to run it. For some reason "cowsay" is not, so you can temporarily add it as described by Terrance using:

PATH=$PATH:/usr/games

If this works, you can permanently add this location to your path variable. This can be done by modifying .profile, .pam_environment, or other locations as described in the references below. For example, adding the following to ~/.profile should work:

export PATH="$PATH:/usr/games"

The above will take effect on the next login.

References:

DougC
  • 233