ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    System Administration: On using BASH, vi and no aliases

    IT Discussion
    system administration sam linux administration general it knowledge essay sam system administration
    11
    14
    3.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      coliver
      last edited by

      I generally use vi but, as I have mentioned in the past, there are some distributions that change how vi works by default which makes it frustrating to use, going from Fedora-esque distributions to Debian-esque distributions is painful as far as vi is concerned, at least for me.

      A 1 Reply Last reply Reply Quote 2
      • A
        alex.olynyk @coliver
        last edited by

        @coliver Yes, like Ubuntu.

        1 Reply Last reply Reply Quote 0
        • B
          brianlittlejohn
          last edited by

          I can hack my way through working with vi... but I need to learn it better.

          1 Reply Last reply Reply Quote 0
          • S
            scottalanmiller @JaredBusch
            last edited by

            @JaredBusch said:

            Knowing how to use vi and choosing to use something better for daily tasks are not mutually exclusive like you are trying to paint here.

            Additionally, you are calling, or at least grouping, nano as uncommon which is far from the truth. It is a core RHEL option, and beyond minimal installs, it is also pre installed.

            That's true, you can know both. Although it is very rare that someone maintains a proficiency in vi while using something else normally.

            Nano is relatively rare. Have working in many UNIX environments and tens of thousands of servers, I'm not sure we've had it once until RHEL 7. (I definitely see it on my desktop installs, just servers, I mean.) Did RHEL 6 have it by default?

            But, even if it is becoming more standard to include it, it's not ubiquitous. It was extremely common to have Joe installed back when I ran into the need for vi, but it wasn't there. People even in the 1990s often argued that emacs and joe were so common that vi wasn't needed to be known any longer. And that's why no one knew it.

            Nano is certainly common today. But in an emergency, you don't know that it will be there. At least nano on RHEL is in /usr/bin. Traditionally those tools were not kept available to single user environments.

            1 Reply Last reply Reply Quote 1
            • F
              Francesco Provino
              last edited by

              Scott, let me tell that you're completely right.
              I use vi as my primary editor, with little customization.
              Vi is everywhere, from the ESXi busybox to router firmware CLI… and I really like how it works.
              My only non-standard temptation is ZSH, but I usually can do almost everything with plain bash (set -o vi, of course).

              S 1 Reply Last reply Reply Quote 2
              • S
                scottalanmiller @Francesco Provino
                last edited by

                @Francesco-Provino said:

                My only non-standard temptation is ZSH, but I usually can do almost everything with plain bash (set -o vi, of course).

                zsh is better than most because it is backwards compatible with bash, so nearly everything that you do is transparent between them. It uses the same conventions and everything, so that falling back to bash you barely notice.

                1 Reply Last reply Reply Quote 1
                • S
                  StrongBad
                  last edited by

                  The thing about vi is that at first you hate it and then later, you still hate it but you forget that you are using it.

                  J 1 Reply Last reply Reply Quote 1
                  • J
                    JaredBusch @StrongBad
                    last edited by

                    @StrongBad said:

                    The thing about vi is that at first you hate it and then later, you still hate it but you forget that you are using it.

                    I never forgot I was using it. I learned it, and can use it, but I will never like it.

                    1 Reply Last reply Reply Quote 1
                    • D
                      Dashrender
                      last edited by

                      I've applied this same philosophy with my use of Windows server (and desktops). Try my best whenever possible to use the default tools, etc. An example, I never changed the default start menu while so many comrades usually would change the start menu back to an older view.

                      1 Reply Last reply Reply Quote 0
                      • T
                        thwr
                        last edited by thwr

                        Very good read. I'm sharing your philosophy and like I said yesterday, I'm a console fetishist. You just need to use what you have when you are in a recovery console or when your server just does not have access to that NFS export or SMB share where all your fancy tools and scripts are.

                        I think it's way more important to understand how things actually work. This will also help a lot when it comes to tracking down errors.

                        PS: This is not about necro'ing an old thread, but the topic just came up once more.

                        1 Reply Last reply Reply Quote 3
                        • 1 / 1
                        • First post
                          Last post