RHSA and VI

MinaryMinary Member Posts: 74 ■■□□□□□□□□
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 Member Posts: 186 ■■■□□□□□□□
    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 Member Posts: 74 ■■□□□□□□□□
    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 Member Posts: 186 ■■■□□□□□□□
    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 Member Posts: 517
    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 Member Posts: 252 ■■■■□□□□□□
    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 Member Posts: 74 ■■□□□□□□□□
    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 Member Posts: 2,015 ■■■■■□□□□□
    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 Member Posts: 549
    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 Mod Posts: 4,570 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.
    Certs: GSTRT, GPEN, GCFA, CISM, CRISC, RHCE

    Learn GRC! GRC Mastery : https://grcmastery.com 

  • MinaryMinary Member Posts: 74 ■■□□□□□□□□
    Lol. I am over the hill with it now. thanks

    ##insert Linux Humor here

    2013-02-27-sudo-bang-bang.png
  • UnixGuyUnixGuy Mod Posts: 4,570 Mod


    icon_cool.gif
    Certs: GSTRT, GPEN, GCFA, CISM, CRISC, RHCE

    Learn GRC! GRC Mastery : https://grcmastery.com 

  • NightShade03NightShade03 Member Posts: 1,383 ■■■■■■■□□□
    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 Member Posts: 136
    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 Member Posts: 565
    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 Member Posts: 913 ■■■■□□□□□□
    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 Mod Posts: 4,570 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.
    Certs: GSTRT, GPEN, GCFA, CISM, CRISC, RHCE

    Learn GRC! GRC Mastery : https://grcmastery.com 

  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    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 Member Posts: 565
    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 Member Posts: 569
    +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 Member Posts: 58 ■■■□□□□□□□
    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 Member Posts: 1,162
    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 Member Posts: 801
    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.