Editing Files on the Server Print

  • 0

nano and vi.

WHAT nano IS

A simple editor, with commands shown at the bottom of the screen.

WHY IT SUITS MOST WORK

It behaves as people expect, and it is on almost every system.

WHAT THE ESSENTIAL KEYS ARE

Control and O to save Control and X to exit Control and W to search Control and K to cut a line

WHAT vi OR vim IS

A modal editor, present on every Unix system without exception.

WHY YOU MUST KNOW THE MINIMUM

Some systems have nothing else, including rescue environments.

WHAT THE MODES ARE

Normal, where keys are commands Insert, where keys are text

HOW TO ENTER INSERT MODE

Press i.

HOW TO LEAVE IT

Press escape.

HOW TO SAVE AND QUIT

Colon, then w and q, then enter.

HOW TO QUIT WITHOUT SAVING

Colon, then q and an exclamation mark.

WHAT TO DO BEFORE EDITING ANY CONFIGURATION

Copy the file to a backup with a dated name.

WHY

It is the only way to return to a working state quickly.

WHAT TO CHECK AFTER EDITING

That the service accepts the file, using its own test command where one exists.

WHAT TO NEVER DO

Restart a service with an untested configuration during business hours.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot