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
        ·
        21 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
        ·
        1 day 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.