How to edit file in centos

Written by kristen waters
  • Share
  • Tweet
  • Share
  • Email

CentOS is a free, open source, Enterprise class Linux distribution which was created using the RedHat Enterprise Linux source code. The majority of the CentOS operating system is exactly the same as the RedHat distribution. Linux configuration files are usually plain text files that can be edited in any text editor. The default command line text editor for CentOS is the Vi text editor. The default graphical text editor is gedit in the Gnome desktop environment and Kate in the KDE desktop environment. You can use any of these text editors to edit plain text files.

Skill level:
Easy

Other People Are Reading

Instructions

    Command Line

  1. 1

    Click on the "Terminal Quick Launch" button in the panel at the bottom of the screen.

  2. 2

    Type the command "vi filename" to open the file in the Vi text editor. Replace "filename" with the name of the file that you want to edit.

  3. 3

    Use the "j" (down), "k" (up), "h" (left) or "l" (right) keys to navigate through the document.

  4. 4

    Press the "i" key to insert text before the cursor. Press the "a" key to insert text after the cursor. Press the "R" key to replace characters. Press the "x" key to delete characters.

  5. 5

    Press the "ESC" key to return to the Command mode and continue to navigate through the document.

  6. 6

    Type ":wq" to save and close the document.

    Graphical Method

  1. 1

    Double-click on the file that you want to edit. The file will open in either the Gedit (Gnome) or Kate (KDE) text editor, depending on the desktop environment you are using.

  2. 2

    Use the mouse to navigate through the text file.

  3. 3

    Use the keyboard to insert, delete and modify the text.

  4. 4

    Click on the "Save" option under the "File" menu to save the file.

  5. 5

    Click on the "X" in the upper right corner of the screen to close the file.

Don't Miss

Resources

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.