Still using these obsolete Linux commands? They might be popular from the olden days but perhaps it is time to look for alternatives.

  • HeartyOfGlass@piefed.social
    link
    fedilink
    English
    arrow-up
    50
    ·
    1 day ago

    Listed programs:

    • scp - “potentially deprecated”
    • e/fgrep - replaced with grep flags
    • net-tools, which includes
      • netstat
      • arp
      • route
      • iptunnel *nameif
    • ifconfig
    • iwconfig
    • iptables
    • pkjqpg1h@lemmy.zip
      link
      fedilink
      English
      arrow-up
      72
      ·
      1 day ago

      Replacement:

      • scprsync or sftp

      • egrep --> grep -E

      • fgrep --> grep -F

      • netstat --> ss

        • arp --> ip n
        • route --> ip route
        • iptunnel --> ip tunnel
        • nameif --> ip link
      • ifconfig --> ip

      • iwconfig --> iw

      • iptables --> nftables

      • stewie410@programming.dev
        link
        fedilink
        arrow-up
        8
        ·
        19 hours ago

        iptables --> nftables

        And if you really want the iptables UX, iptables-nft is also an option (at least on Debian). While I prefer firewalld most of the time on a server, my boss really wants to stick with the same tools he’s used for 20yr; so iptables-nft it is.

      • lambalicious@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        21
        ·
        23 hours ago

        rsync is cool but is nowhere a replacement for scp’s main use case. scp actually uses your SSH client settings file, whereas rsync doesn’t (it does have the opportunity to use a SSH command, which you then have to setup separately).

    • ken@discuss.tchncs.de
      link
      fedilink
      arrow-up
      13
      ·
      edit-2
      1 day ago

      Just to be clear, most of these (think about egrep/fgrep for a moment) are deprecated and “shouldn’t be used” in scripts for distribution. What’s new is that you can’t expect everyone else to have them and having dependency on them in shipped software is considered antipattern.

      Nobody gives a shit what aliases and shims you use in your own shell.

      On iptables: By now it’s even gone from kernel and the turn tabled with the cli command now actually being a shim calling into its successor nft. IMO nft is much more approachable for beginners to pick up and the rules files become so much more readable and maintainable. If you’re already committed to iptables syntax then cool - but with very few exceptions I don’t think anyone needs to learn iptables today - just go straight to nft and you’ll be happier for it. Similar for ifconfig.

  • Admiral Patrick@dubvee.org
    link
    fedilink
    English
    arrow-up
    30
    ·
    1 day ago

    The thing about these deprecated tools is that the replacements either suck, are too convoluted, don’t give you the same info, or are overly verbose/obtuse.

    ifconfig gave you the most relevant information for the network interfaces almost like a dashboard: IP, MAC address, link status, TX/RX packet counts and errors, etc. You can get that with ip but you’ve got to add a bunch of arguments, make multiple calls with different arguments, and it’s still not quite what ifconfig was.

    Similarly, iwconfig gave you that same “dashboard” like information for your wireless adapters. I use iw to configure but iwconfig was my go-to for viewing useful information about it. Don’t get me started on how much I hate iw’s syntax and verbosity.

    They can pry scp out of my cold dead hands.

    At least nftables is syntax-compatible.

  • twinnie@feddit.uk
    link
    fedilink
    arrow-up
    17
    ·
    edit-2
    1 day ago

    Why did they even get rid of the net-tools stuff? Since everyone is still using them why not just bring them back? I don’t see how they can be a security issue. When I set up a new distro one of the first things I do is install it again.

    Even the article says that the reason scp is so popular is that it copies the cp syntax. Why constantly force people to relearn jobs they already know how to do?

    Rustscan is supposed to be so much faster than nmap but I still use nmap because I can’t be bothered learning another tool. Just use the same syntax for gods sake.

    • chrash0@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      1 day ago

      sometimes syntax changes are part of the decision to do a rewrite. these are user interfaces at the end of the day. i’m not saying you’re wrong about any particular case, but it’s like saying “why make Instagram when Facebook exists” or “why make Scala when Java exists” etc. i like a good fresh look at how we use and instrument and teach our development tooling.

      also, when i was 18 and would tell IT professionals i was getting a computer science degree, the #1 response was, “get ready to spend the rest of your life learning new things.” and i’ve found that to largely be true