![]() The cut/uncut feature is a great way to move and or copy lines within nano. + – print out the current line numberĪ couple of notes on the above. Some of the more handy key combinations I use are: You will also note, at the bottom of the window, a row of commands you can use with nano. Once you’ve saved work in nano, it will do some color coding, depending on the type of file you’ve written (in this example, we’ve written a Bash script, so it is applying the appropriate syntax highlighting). If you’ve made any edits since you last did a write out, nano will ask if you want to save your work before exiting ( Figure 2 ). If, however, you’ve completed your work and want to save and exit, enter the key combination +. This will save what you’ve written so far and allow you to keep working. Type the content of that file into the editor ( Figure 1 ) and you can quickly save the file with the key combination +. To open/create this file in nano, you will first open up your terminal and issue the command nano backup_home. Let’s say we’re going to create a backup script for the folder /home/me and we’re going to call that script backup_home. I’ll walk you through the process of creating a file in nano, editing the file, and saving the file. Nano offers text editing without the steeper learning curve found in vi. For that, I turn to the simplicity of Nano. Most often, I simply need to create a Bash script or tweak a configuration file. Because I don’t code nearly as much I used to, I typically have no need of the programming power found in vi. Nano has been my editor of choice for a very long time. ![]() In this article, I’ll get you up to speed on using each, so that you can can feel confident in your ability to write, edit, and manage your Linux configuration files, scripts, and more. To that end, it is in the best interest to every fledgling Linux user to get to know one (or both) of these editors. ![]() They are the text-based editors that Linux administrators turn to when the need arises…and it will arise. These are two tools that might strike fear in the hearts of newbies and put seasoned users at ease. When you do, you will turn to one of the popular text editors available to the Linux platform. At some point in your Linux administration career, you are going to edit a configuration file, write a Bash script, code, take a note, or any given task associated with text editors.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |