• Contact Us
  • copyright
  • About Us
  • Privacy Policy
  • Devops
  • Linux
Globedrill

which command not found. Install Which command on Fedora

Linux/17 May, 20/338/0
Linux

How to Install Which command on Fedora server

 

Got the error ‘which command not found’ on my Fedora server. Which command is used on Fedora servers to locate the executable file of a Linux command.

# 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
 

# yum 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
 

# which -V
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
 

wget https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/31/Everything/x86_64/os/Packages/w/which-2.21-15.fc31.x86_64.rpm

 
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

 

# 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 :
 

[root@fedora /]# dnf install which-2.21-15.fc31.x86_64.rpm

 

Leave a Reply Cancel reply

.

About Us

Globedrill.com is a website that publishes articles related to Linux and Devops. Globedrill was started on April 2016.

Contact Us

Email : globedrill.c@gmail.com

Globedrill

Copyright © 2016 Globedrill. All Rights Reserved. The content in this website is copyrighted to Globedrill.com and may not be republished either online or offline.

  • About Us
  • Privacy Policy
  • Contact Us
  • copyright