RHSA and VI

MinaryMinary Posts: 74Member ■■□□□□□□□□
I am just starting out on studying for this exam. Todate I have always used nano text editor. It seems like you can use this in the exam too.

I HATE Vi. But it seems it is required to edit the sudoers file with visudoer (In the file itself it says it must be edited with Visudo).

I see that you can change your text editor to use nano.

export EDITOR=nano
visudo

visudo how to replace vi with nano instead??? - FedoraForum.org

Should I just bite the bullet and learn Vi ? Will I look like a noob forever if I stick with nano?

(IMO Vi is possibly the leading reason people start and then stop using Linux )

Comments

  • brombulecbrombulec Posts: 186Member ■■■□□□□□□□
    Minary wrote: »
    I am just starting out on studying for this exam. Todate I have always used nano text editor. It seems like you can use this in the exam too.

    I HATE Vi. But it seems it is required to edit the sudoers file with visudoer (In the file itself it says it must be edited with Visudo).

    I see that you can change your text editor to use nano.

    export EDITOR=nano
    visudo

    visudo how to replace vi with nano instead??? - FedoraForum.org

    Should I just bite the bullet and learn Vi ? Will I look like a noob forever if I stick with nano?

    (IMO Vi is possibly the leading reason people start and then stop using Linux )

    I think that a few simple vi commands will be useful on any unix system. Nano is not common among the sysadmins icon_smile.gif
    VI is a good editor, just try to use it and do not be discouraged - it's really easy.

    --
    Regards
  • MinaryMinary Posts: 74Member ■■□□□□□□□□
    Just trying it as we speak. It is everything that you could possibly get wrong in terms of designing something people can naturally use. It is very 80's.
  • brombulecbrombulec Posts: 186Member ■■■□□□□□□□
    I agree but even modern unix system have a vi as one of the default editors.
    Of course you can install nano on RH exams but do you really want lock yourself in system with this editor? Moreover, if you know sed and vi and awk you can do anything with any text file on linux. It's really worth it :)
  • Vask3nVask3n Posts: 517Member
    At first I was intimidated by vi but it grew on me and I use it exclusively when writing Perl scripts nowadays. Being able to jump to line numbers, perform global substitution and other stuff from quick command shortcuts is really helpful. Yeah, you can do some of it in Nano too which I will use on occasion but I will take Vi over any GUI editor and over most other CLI editors.
    Working on MS-ISA at Western Governor's University
  • ExpectExpect Posts: 251Member
    vi is one of the mandatory tools one must know in the Linux world.

    on some UNIXes you don't have anything else other than vi.

    I highly recommend learning it for both RHCSA/RHCE.
  • MinaryMinary Posts: 74Member ■■□□□□□□□□
    I'll stick out and learn it. I know it only takes a bit to get used too. It would be Easy to have an old and new version of vi control(like nano). They could have :+capslock+tab+shift+control+Q+} to switch vi into human editing mode ? :)
  • DoubleNNsDoubleNNs Posts: 2,013Member ■■■■■□□□□□
    I don't think vi is hard to use at all, as long as you can use the arrow keys. I can't get used to the hjkl buttons for cursor movement.
    Goals for 2018:
    Certs: RHCSA, LFCS: Ubuntu, CNCF CKA, CNCF CKAD | AWS Certified DevOps Engineer, AWS Solutions Architect Pro, AWS Certified Security Specialist, GCP Professional Cloud Architect
    Learn: Terraform, Kubernetes, Prometheus & Golang | Improve: Docker, Python Programming
    To-do | In Progress | Completed
  • brownwrapbrownwrap Posts: 549Member
    Even if you have other tools available, like Emacs, if you are trying to rescue a system, most likely you will have vi when it comes up.
  • UnixGuyUnixGuy SABSA, GCFA, GPEN, CISM, RHCE, Security+, Server+, CCNA Posts: 3,943Mod Mod
    VI can be intimidating in the beginning, but trust me it's easy once you get used to it. As others have pointed out, you will end up using few VI commands anyway to do everything you need to know. Learn VI, you absolutely need it to be a good sys admin.

    I mentor few sys admins at work, and the first thing I did was uninstall nano and forced them to learn VI.



    This is a joke I saw on facebook the other day... icon_lol.gif

    Q: How to create random string in Linux?
    .
    .
    .
    .
    .
    .
    .
    .
    ..
    .
    .
    .
    .
    .
    Ans: Put a beginner user in front of 'vi' editor and ask her/him to close it.
    Goal: MBA, March 2021
  • MinaryMinary Posts: 74Member ■■□□□□□□□□
    Lol. I am over the hill with it now. thanks

    ##insert Linux Humor here

    2013-02-27-sudo-bang-bang.png
  • UnixGuyUnixGuy SABSA, GCFA, GPEN, CISM, RHCE, Security+, Server+, CCNA Posts: 3,943Mod Mod
  • NightShade03NightShade03 Posts: 1,383Member ■■■■■■■□□□
    Actually nano doesn't come installed as a default in RHEL/Centos 6 or 7 so Vi is really the only option you have unless you purposely install the nano text editor. Like you I used nano for a while, but it definitely helps to know both and Vi does grow on you after a while.
  • RaisinRaisin Posts: 136Member
    The version of Vi found on old Unix systems can be a pain in the ass to use, and I understand why people hate it. Most Linux systems come with a version of Vim which is very easy to use, and I don't understand why anyone would bother with Nano. You really just need to get comfortable with switching between the different modes of vim and then you're set. While entire books have been written about vi/vim you can get by with just knowing a few key things.
  • jmritenourjmritenour Posts: 565Member
    Actually nano doesn't come installed as a default in RHEL/Centos 6 or 7 so Vi is really the only option you have unless you purposely install the nano text editor. Like you I used nano for a while, but it definitely helps to know both and Vi does grow on you after a while.

    And to follow on what NightShade said, for Red Hat exams, don't necessarily count on being able to install it, either. You won't have root on your testing station, and the repos your VMs will use is usually pretty minimal, having only the packages needed for items to be installed as required by the exam.
    "Start by doing what is necessary, then do what is possible; suddenly, you are doing the impossible." - St. Francis of Assisi
  • jvrlopezjvrlopez Posts: 911Member ■■■■□□□□□□
    Don't like the lack of immediate input and cursor movement in VI but I don't like the hate others give you for using Nano. To be honest, I just do basic text editing so I use Nano. I've only ever met one other user who preferred Nano.

    It took me forever to find out that Alt - ? is the command to go down to the last line...
    And so you touch this limit, something happens and you suddenly can go a little bit further. With your mind power, your determination, your instinct, and the experience as well, you can fly very high. ~Ayrton Senna
  • UnixGuyUnixGuy SABSA, GCFA, GPEN, CISM, RHCE, Security+, Server+, CCNA Posts: 3,943Mod Mod
    @jvrlopez:

    It's not 'hate' we're giving to nano, it's just that nano isn't simply available in single user mode (where you need to do some serious troubleshooting) , so getting comfortable with VI is a requirement. Plenty of UNIX variants don't even have nano, so learning VI will make your system administration skills more transferable across many UNIX variants.
    Goal: MBA, March 2021
  • ally_ukally_uk Posts: 1,146Member ■■■■□□□□□□
    Ditch Nano and learn Vi or Vim

    Yes it will take a bit of getting used to but once you get the hang of things it is very powerful :)

    Just create a text file and learn the modes of operation that's what I did and document what you have done.

    VIM Adventures
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • jmritenourjmritenour Posts: 565Member
    UnixGuy wrote: »
    @jvrlopez:

    It's not 'hate' we're giving to nano, it's just that nano isn't simply available in single user mode (where you need to do some serious troubleshooting) , so getting comfortable with VI is a requirement. Plenty of UNIX variants don't even have nano, so learning VI will make your system administration skills more transferable across many UNIX variants.

    +1

    Nano isn't horrible, but I've been too many solid Linux admins who were used to nano get into a situation where they didn't have access to it and were totally crippled. It's hard enough being used to vim and having to go back to old school vi...

    Nano might have been ported to Solaris, AIX, etc, but I have yet to see it installed on them.
    "Start by doing what is necessary, then do what is possible; suddenly, you are doing the impossible." - St. Francis of Assisi
  • Chivalry1Chivalry1 Posts: 569Member
    +1

    I prefer VI and/or VIM over its Nano. Like most have already mentioned you won't likely NANO installed. I think you won't be able to escape without learning VI.
    "The recipe for perpetual ignorance is: be satisfied with your opinions and
    content with your knowledge. " Elbert Hubbard (1856 - 1915)
  • srjsrj Posts: 58Member ■■■□□□□□□□
    I'm still fairly new in my Linux career. That being said, I would think that the similarities between navigating around in less and vim would be a benefit as well.

    I recommend the vimtutor. Just run vimtutor from command line. It is a copy of the file, so you don't have to worry about anything. It is an open sandbox to learn in.

    To me the fact that it comes default with many platform is a win. Unix, Mac OS X, Linux, etc. I'm still very much a junior Linux admin, but I also hear that a number of embedded devices have vi by default. I would at least become proficient in it before jumping elsewhere. You can always have a baseline proficiency in case of an emergency, but use nano as your preffered editor. That was my plan, but now I won't take nano back.
  • VeritiesVerities Posts: 1,162Member
    Its interesting to read through this thread as I've never used anything but VI. I recommend having a **** sheet with the VI common commands on it while you're learning it.
  • onesaintonesaint Posts: 801Member
    VI / VIM for the win. It's old school and can be found everywhere, be it some emergency environment or random Unix distro. If you want something more, pick up Emacs (it's an awesome operating system, lol). As others have mentioned, for sysadmin purposes Nano is a convienence rather than a default package, unless your shop runs Ubuntu and then, I'm sorry. :D
    Work in progress: picking up Postgres, elastisearch, redis, Cloudera, & AWS.
    Next up: eventually the RHCE and to start blogging again.

    Control Protocol; my blog of exam notes and IT randomness
Sign In or Register to comment.