I just want to know if a FTP server is installed on my server. It is a Red Hat Enterprise Linux Server release 5.8 (Tikanga). I tried running the below command and got connection refused :

$ ftp localhost
ftp: connect: Connection refused
  • 2
    can you be more specific regarding your linux distribution ? – mazs Apr 27 '16 at 6:58
  • 2
    Which distribution of linux? – sjsam Apr 27 '16 at 7:00
  • its Red Hat Enterprise Linux Server release 5.8 (Tikanga) – chandra prakash Apr 27 '16 at 7:02

If you know the package name you could do something like

dpkg -l vsftpd

to see what the package is about.

If you don't have any idea about package name

On debian or debian based systems you may do

dpkg -l | grep ftp # grab everthing that contain ftp 

And with the results, you may do

dpkg -p result

On Redhat or Redhat based systems like Fedora , you may do

rpm -qa | grep ftp

and with the results

rpm -qi result # to know more about the package, whether it is the server itself or some suplimentary

On Systems like Fedora

yum list installed | grep ftp

Then do

yum info package_name
  • Why use --get-selections, -l is a lot simpler and just as good in this case. – Henrik supports the community Apr 27 '16 at 7:05
  • @Henrik : Updated and thanks for the info. I recently migrated from Redhat to Debian and am getting used to it – sjsam Apr 27 '16 at 7:20
  • 1
    and no need for grep with dpkg either - dpkg -l '*ftp*' works just fine (the single quotes are to avoid shell globbing in case there are files or sub-directories that match *ftp* in the current directory). – cas Apr 27 '16 at 8:26

ftp is installed, otherwise you would get some "command not found error" what is not installed, or not configured is the FTP server (probably ftpd)


If You are a RHEL user you can use:

service vsftpd status

It will give the following response if the service is not running :

vsftpd: unrecognized service

and if the service is running in your server:

vsftpd (pid XXXX) is running...

You are getting ftp: connect: Connection refused because you have the FTP client installed in the system but FTP server is not installed. You can install the FTP server vsftpd and try the same it should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.