Installing "which" on Ubuntu 18.04.4
Googling for the "which" program is not exactly easy, as the ubiquity of the program name defeats search. sudo apt-get install which doesn't work out of the gate, so I was wondering if someone knew which repository which is found in (confusing?), or if I have to download it and compile from the source.
which is needed for me to get Buildroot set up. |
Quote:
Quote:
You can find the source on ftp.gnu.org/gnu/which. The latest version is 2.21, which is already 5 years old. But as it already tells you, in some shells (not bash, as far as I know) it is a built-in, so not an external program. In tchs it IS: Quote:
|
Now I feel dumb. When I ran sudo apt-cache policy which, it said it wasn't installed. I just tried it: which ping, and the result was the as-expected /bin/ping. Thank you!
|
Quote:
|
which on Debian (excluding the version currently in sid) and Ubuntu (excluding not yet released Jammy) is a Debian-specific shell script provided by package debianutils. It was recently deprecated, and now is managed through Debian Alternatives System, so it could be GNU which, or FreeBSD which, or still the old Debian which.
Possible alternatives are listed in the comments to the bug report linked above:
|
All times are GMT -5. The time now is 02:20 AM. |