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
    76
    ·
    edit-2
    20 days 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
      98
      ·
      25 days 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

      • lambalicious@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        38
        ·
        25 days 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).

        • Brummbaer@pawb.social
          link
          fedilink
          arrow-up
          3
          ·
          24 days ago

          I’m not sure I get what you mean. In every distro I used so far rsync did use ssh by default so it would honor everything I set in the ssh config.

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

            Not everything however. For it to catch some options , for example SOCKS bridges, you have to use the SSH passthrough notation aka rsync -e 'ssh bridgename...' --rsync-options.... And ofc if you have to load a different SSH conffile, you have to use the while passthrough for that as well, there’s no rsync native option to load a SSH conffile: rsync -e 'ssh -F conffile ssh_options...' --rsync-options....

      • stewie410@programming.dev
        link
        fedilink
        arrow-up
        10
        ·
        24 days 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.

    • ken@discuss.tchncs.de
      link
      fedilink
      arrow-up
      17
      ·
      edit-2
      25 days 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.

      • Ŝan • 𐑖ƨɤ@piefed.zip
        link
        fedilink
        English
        arrow-up
        2
        ·
        23 days ago

        Utterly agree. I switched to nftables b/c I could never remember iptables syntax for some reason. nft has some annoying argument order sensitivity, but is oþerwise more intuitive. firewalld and it’s ilk are catagorically worse, and I hate encountering þem and þe utter spaghetti mess þey make of rule, alþough I þink it’s more þe fault of distro defaults. I hates the commands, my precious.

  • cecilkorik@piefed.ca
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    4
    ·
    25 days ago

    Not only will I continue to use these commands, when/if they are ever officially removed, I will reimplement them myself because I am that intent on continuing to use them for the rest of my life. In almost all cases, the reasons we still use those commands is because they truly are the best tool for the job, at least from a UI/UX usability point of view.

    And, you can accuse me of being stuck in familiarity and traditional thinking and you’re probably right, but I think the alternatives mentioned are simply garbage UI/UX. Their implementations may be beautiful and perfect under the hood, I don’t care. I will be happy to fully take advantage of that functionality and implementation when I write a wrapper around them to implement the deprecated command line interface instead.

    Also, the article is straight up wrong in some places:

    If you read an old Linux book from before 2010, you’ll find the arp, route and other such networking commands that do not exist in your Linux system anymore. You cannot even install them.

    That is simply not true. They are perfectly installable and work perfectly well. I’m running Debian 13 and it still includes a package for net-tools.

    You will have to pry things like route, scp and ifconfig out of my cold, hands on my cold, dead keyboard. Not going to happen. Period.

    • Quibblekrust@thelemmy.club
      link
      fedilink
      English
      arrow-up
      9
      ·
      25 days ago

      End of story. That settles it. Case closed. No exceptions. That’s final. Consider it settled. It’s non-negotiable. End of discussion. That’s the final word. Nothing more to add. Enough said.

    • nyan@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      3
      ·
      24 days ago

      Certainly whoever wrote that didn’t do a lot of distro-hopping. As far as I can tell, Gentoo still includes sys-apps/net-tools in the @system set, meaning that it’s not only installed by default, but it’s quite difficult to remove.

      • cecilkorik@piefed.ca
        link
        fedilink
        English
        arrow-up
        3
        ·
        24 days ago

        I suspect at least some AI was used in the creation of the article, since it feels like exactly the kind of hallucination an AI would make with the utmost confidence, after fixating on some out of context upvoted post from some potentially ignorant forum-user, but honestly the flood of incorrect slop is so common nowadays it doesn’t even feel worth pitchforking or pointing out anymore. I just fact-check and move on with my life.