In Networking Last updated:
Share on:
Cloudways offers managed cloud hosting for any size business to host a website or complex web applications.

How to get telnet working on CentOS/RHEL and MacOS?

telnet is not available by default on a higher version of CentOS/RHEL and MacOS. But that doesn’t mean you can’t get it installed.

When you run telnet, you will notice the following error.

[root@instance-1 ~]# telnet
-bash: telnet: command not found
[root@instance-1 ~]#

To fix this, you need to install telnet and it’s easy.

Installing telnet on CentOS/RHEL

  • Log in to the server as root
  • Run the below command to install
yum -y install telnet

You can also use DNF if using CentOS 8.

dnf -y install telnet

It’ll download the package and install and show you the complete confirmation below.

Downloading packages:
telnet-0.17-64.el7.x86_64.rpm                                                                                                              |  64 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:telnet-0.17-64.el7.x86_64                                                                                                                    1/1 
  Verifying  : 1:telnet-0.17-64.el7.x86_64                                                                                                                    1/1 

  telnet.x86_64 1:0.17-64.el7                                                                                                                                     


Now, you can run telnet

[root@instance-1 ~]# telnet

Have fun!

Installing telnet on MacOS

To install telnet on MacOS, you need to have/install Homebrew.

  • Launch terminal and run the below command to install Homebrew (skip if you already have)
/usr/bin/ruby -e "$(curl -fsSL"
  • It will take a few seconds and once done; you will see the success message.
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 4947, done.
remote: Counting objects: 100% (4947/4947), done.
remote: Compressing objects: 100% (4748/4748), done.
remote: Total 4947 (delta 49), reused 337 (delta 7), pack-reused 0
Receiving objects: 100% (4947/4947), 3.99 MiB | 3.17 MiB/s, done.
Resolving deltas: 100% (49/49), done.
Tapped 2 commands and 4731 formulae (4,989 files, 12.4MB).
Already up-to-date.
==> Installation successful!

Great, its time to install telnet using brew command

brew install telnet
  • It will download and install the necessary package. Once done, rerun the telnet.
Chandans-iMac:~ chandan$ telnet

It was easy. Isn’t it?

Want to build a career in Sysadmin? Check out this Linux administration online course.

Share on:
  • Chandan Kumar
    Chandan Kumar is a seasoned technology enthusiast and entrepreneur passionate about empowering businesses and individuals globally. As the founder of Geekflare, a leading technology publication, Chandan has spearheaded the development…

Thanks to our Sponsors

More great readings on Networking

Power Your Business

Some of the tools and services to help your business grow.
  • The text-to-speech tool that uses AI to generate realistic human-like voices.

    Try Murf AI
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.

    Try Brightdata
  • is an all-in-one work OS to help you manage projects, tasks, work, sales, CRM, operations, workflows, and more.

    Try Monday
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.

    Try Intruder