I'm trying to connect the server using telnet, but when I enter telnet localhost 8000. It shows the error of telnet not found. I wrote my code in C and ran it on macOS terminal. Am I supposed to install something before I can use it?
bash: telnet: command not found [closed]
Yes you would need to install telnet to use it on your mac. You can also try using an alternative tool, that comes pre-installed on macOS machines. It is called netcat
and you can do the following:
nc -vz localhost 8000
If the command above is not good enough, you can install telnet on your mac by following the tutorial that can be found here:
https://osxdaily.com/2018/07/18/get-telnet-macos/
More precisely, the section titled:
Installing Telnet in MacOS with Homebrew
You will need to install homebrew (it is a package manager for MacOS, similar to yum or apt in linux).
I am not sure if we are allowed to share 3rd party links here but if you google 'install telnet macos' you'll find plenty of tutorials –
Felonious
Please edit your answer to add information instead of writing a comment. Yes, you can show a link to a tutorial, but you should also cite the relevant part in your answer, so that the essential answer is found here directly. –
Levitus
Thank you for your help! –
Defalcate
brew install telnet
formulae.brew.sh/formula/telnet –
Quartern © 2022 - 2024 — McMap. All rights reserved.
telnet
is a somewhat outdated standard program. Apparently you have to install it. For details how to install it on Linux you would have to tell your Linux distribution and version. Please edit your question to add information or clarification. Don't use comments for this purpose. – Levitustelnet
. – Levitus