Instalar la última versión de nano en Ubuntu y derivados.
GNU nano es el editor de texto de terminal predeterminado en Ubuntu, pero no solo eso, también lo es en el caso de iniciar el sistema en modo recuperación. Esta es una de las principales razones por las que Ubuntu retiene una versión obsoleta de nano como predeterminada, aunque yo considero que es una excusa.
En este articulo veremos como actualizar a la ultima versión de nano, que a día de hoy (23-09-2019) es la 4.4. No es difícil.
Instalar la última versión de nano
Puedes comprobar la versión instalada con el siguiente comando:
nano -V
Se imprimirá en pantalla algo similar a…
sololinux ~ $ nano -V
GNU nano, versión 2.5.3
(C) 1999..2016 Free Software Foundation, Inc.
Correo: nano@nano-editor.org Web: http://www.nano-editor.org
Opciones compiladas: –disable-libmagic –disable-wrapping-as-root –enable-utf8
Como puedes ver, nuestro Ubuntu 16.04 viene con la versión 2.5.3 (bastante obsoleto). Vemos como actualizar fácilmente a la ultima versión.
Comenzamos desinstalando el antiguo nano, e instalando algunas dependencias que necesitaremos.
sudo apt-get remove nano
sudo apt-get build-dep nano sudo apt-get install libmagic-dev
Ahora puedes revisar el sitio de descargas oficial, y verificar la ultima versión con extensión «tar.gz«.
En este caso es la versión 4.4, así que sin más demora la descargamos.
wget https://www.nano-editor.org/dist/v4/nano-4.4.tar.gz
Extraemos el contenido del paquete, y accedemos a la carpeta generada.
tar -xf nano-4.4.tar.gz
cd nano-4.4
Una vez en la carpeta de nano, lanzamos el script de instalación junto con el soporte de codificación de caracteres UTF-8.
./configure --enable-utf8
Compilamos e instalamos ignorando los mensajes de depuración.
make sudo make install
Una vez instalado recargamos la shell bash.
source ~/.bashrc
Ya tienes instalada la ultima versión de nano, felicidades. Si por algún motivo quieres regresar a la versión original, ejecuta los siguientes pasos:
apt-get autoremove nano
sudo apt-get install nano
Damos por concluido este pequeño tutorial.
Espero que este articulo te sea de utilidad, puedes ayudarnos a mantener el servidor con una donación (paypal), o también colaborar con el simple gesto de compartir nuestros artículos en tu sitio web, blog, foro o redes sociales.
Gracias Sergio,
es una actualización interesante.
Me permito hacer una nota: es posible que tras el comando «./configure –enable-utf8«, aparezca un error:
En ese caso, bastará con instalar una librería adicional, con el comando: «sudo apt install libncursesw5-dev«, luego repetir «./configure –enable-utf8» y seguir con el «make» y «sudo make install«.
Feliz navegación.
Gracias por el aporte Henry.
Me gustó pero me queda la intriga de cuales son las mejoras que incorpora la versión nueva. A pesar de que uno lo puede buscar está bueno leerlo en este tipo de post y con alguna que otra opinión del autor.
Hola Matias.
No es fácil lo que pides, ten en cuenta que cada mes y medio (aproximadamente) lanzan una nueva versión, y las mejoras notables son apenas tres o cuatro, el resto son pequeños detalles y bugs.
Mi opinión personal sobre nano?, es que es el editor más versátil que hay, no tiene mucho que envidiar a los grandes, y tampoco se queda cojo en nada. Ademas tiene un punto fuerte que otros como Vi/Vim no tienen (ojo, soy usuario de Vim), es valido para todo y para todos, y al decir todos me refiero a que su curva de aprendizaje es muy rápida, inclusive para los recién llegados a linux, y eso es primordial. Como siempre digo… si queremos promocionar linux debemos facilitar su acceso y uso, no dificultarlo.
Un saludo.
Detalle ampliado de la actualización.
browser: draw a bar of spaces only where needed — for the selected item
build: exclude the search-at-startup feature from the tiny version
bump version numbers and add a news item for the 4.4 release
copying: do not prevent M-6 from copying emptiness into the cutbuffer
display: blank the status bar on a successful cut or paste
display: clear the remainder of a row only when there actually is some
display: don’t clear a row beforehand — just clear the remainder
display: use a somewhat faster method to clear a row
display: when linenumbering, correctly spotlight text that spans two rows
display: where needed, use slow blanking, but elsewhere do it much faster
docs: change a few URLs over to https, and rewrap a couple of NEWS items
docs: document the search-at-startup feature (+/string or +?string)
docs: make the synopsis of –speller and ‘set speller’ more accurate
docs: mention the M-N toggle instead of the obsolete M-# one
docs: slightly reword some of the descriptions around syntax highlighting
docs: slightly reword the descriptions of most configure options
docs: stop mentioning the ‘unjustify’ function, as it no longer exists
gnulib: update to its current upstream state
new document: a condensed overview of nano’s shortcut keystrokes
new feature: allow specifying a search string to «jump to» at startup
rcfile: properly handle an empty syntax before an ‘include’ statement
scrolling: don’t overscroll when the edit window has just one row
search: don’t wipe the status bar at startup when there was an error
search: wipe the status bar before searching again (M-W / M-Q)
syntax: c: allow an underscore in lowercase type names
syntax: default: colorize bracketed section headers in some config files
syntaxes: change some unneeded ‘icolor’ commands to ‘color’ commands
syntaxes: recognize .ctp extension as a PHP file, and .cu as a C/C++ file
syntax: perl: avoid recognizing embedded hash signs as a comment starter
syntax: perl: avoid upsetting older glibcs with crafty range expression
syntax: perl: don’t color the character after a variable name
syntax: po: colorize numbers only when they form a self-contained word
text: copy leading quote characters when automatic hard-wrapping occurs
tweaks: add a translator hint, to clarify four short words
tweaks: call the correct lighting function directly when softwrapping
tweaks: condense some comments, and drop two unneeded initializations
tweaks: drop two parameters that are no longer needed
tweaks: improve a comment, and drop a superfluous one
tweaks: improve a handful of comments
tweaks: make a function name unique, to not overlap with others
tweaks: move a call from two different places to a single place
tweaks: move a function to before the first one that calls it
tweaks: move a general function to a better place
tweaks: remove a saving and restoring that has become superfluous
tweaks: rename a function, to suit better, and reshuffle its parameters
tweaks: rename a parameter in three functions, to say what it points to
tweaks: reshuffle an assignment, and trim some excessive blank lines
tweaks: reshuffle an ‘if’ out of a function, and rename the function
tweaks: reword and condense two comments, and correct another
tweaks: rewrap two lines, and reshuffle some logic to make more sense
tweaks: shorten two messages that translators tend to make too long
tweaks: try the allocation of a multidata cache just once per line
tweaks: when precalculating, allocate all the cache space upfront
rcfile: for an empty syntax, show the line number of the ‘syntax’ command
rcfile: report the correct command location for an invalid ‘include’
search: accept toggles for case and regex when searching at startup