which command not found. Install Which command on Fedora
How to Install Which command on Fedora server
# which ping
bash: which: command not found
On Fedora servers, which command is provided by which package. Do the below steps to install Which package on Fedora server.
1. Log into Fedora server as ‘root’ user or as sudo user
2. Install which command using dnf command
Command to install which package:
#dnf install which
OR
#sudo dnf install which
Fedora Modular 31 – x86_64 – Updates 2.5 kB/s | 6.5 kB 00:02
Fedora 31 – x86_64 – Updates 1.0 kB/s | 5.0 kB 00:05
Fedora 31 – x86_64 – Updates 223 kB/s | 2.7 MB 00:12
Dependencies resolved.
===================================================================================================
Package Architecture Version Repository Size
===================================================================================================
Installing:
which x86_64 2.21-15.fc31 fedora 42 k
Transaction Summary
===================================================================================================
Install 1 Package
Total download size: 42 k
Installed size: 85 k
Is this ok [y/N]: y
3. Run the following command to verify installation by checking which version
GNU which v2.21, Copyright (C) 1999 – 2015 Carlo Wood.
How to download and install which rpm
1. Log into fedora server as ‘root’ user or as sudo user
2. Download which package from fedoraproject.org website using wget command
3. Install which package using rpm command or dnf command
Install which package using rpm command :
rpm -ivh which-2.21-15.fc31.x86_64.rpm
Verifying… ################################# [100%]
Preparing… ################################# [100%]
Updating / installing…
1:which-2.21-15.fc31 ################################# [100%]
—
Install which package using dnf command :