Skip to main content
Engineering LibreTexts

05-A.3: Nano Editor

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Nano Editor

    Anther editor that is often used is nano. It is much less powerful than vim, but can be simpler to use for those not used to all the nuances of vim.

    To get to nano, simply type the command on the command line, and if you have a file you want to edit, include the file name. Nano opens up the file and places the cursor at the top of the file. To move around you can use the arrow keys or the PageUp/PageDown keys, as well as the Home/End keys. These will behave as you expect them to.

     GNU nano 4.8                       New Buffer
    Not like the brazen giant of Greek fame,
    With conquering limbs astride from land to land;
    Here at our sea-washed, sunset gates shall stand
    A mighty woman with a torch, whose flame
                                    [ Read 5 lines ]
    ^G Get Help  ^O Write Out ^W Where Is  ^K Cut Text  ^J Justify   ^C Cur Pos
    ^X Exit      ^R Read File ^\ Replace   ^U Paste Text^T To Spell  ^_ Go To Line

     For editing, the Delete key and backspace key will remove individual characters. Using the key sequence CTRL+^ you can "mark" text that you want to copy, then move the cursor to the end of the section of text, hit Alt+^ which copies the marked text, then move the cursor to where you desire to place the text, and Ctrl+U will paste it before the cursor position.

    All of the commands shown at the bottom of the window are a CTRL key in conjunction with the specified key. You do NOT have to use the shift key - so ^G is simply the Ctrl key pressed along with the g key.

    05-A.3: Nano Editor is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?