Skip to main content
4 of 5
clarify based on comment
ctrl-alt-delor
  • 28.8k
  • 11
  • 66
  • 113

Why are < or > requried to use /dev/tcp

When trying to call /dev/tcp/www.google.com/80, by typing

/dev/tcp/www.google.com/80 

Bash says no such file or directory. When looking at other people's code online, they use syntax such as

 3<>/dev/tcp/www.google.com/80 

I noticed that this works as well:

</dev/tcp/www.google.com/80

Why are these symbols required to call certain things in bash?

john doe
  • 1k
  • 2
  • 18
  • 32