如何在Ubuntu上切换到netcat-traditional?

32

我该如何在Ubuntu中切换到netcat-traditional?每当我输入netcat -h时,似乎我正在运行netcat-openbsd

我是Ubuntu的新手,所以确切的命令会很有帮助。

1个回答

56
  1. 启用宇宙仓库(如果未启用)

sudo add-apt-repository universe
  • 使用Synaptic安装另一个netcat。(为此,必须启用universe存储库。)

  • sudo apt-get install netcat-traditional
    
  • 输入命令sudo update-alternatives --config nc

  • 选择选项/bin/nc.traditional

  • 输入命令nc -h

  • 输出结果:

    [v1.10-38]
    connect to somewhere:   nc [-options] hostname port[s] [ports] ...
    listen for inbound: nc -l -p port [-options] [hostname] [port]
    options:
        -c shell commands   as `-e'; use /bin/sh to exec [dangerous!!]
        -e filename     program to exec after connect [dangerous!!]
    ...
    

    1
    注意:第一步 sudo apt-get install netcat - user153882

    网页内容由stack overflow 提供, 点击上面的
    可以查看英文原文,
    原文链接