Help

Editing in the vi text editor

By default, the vi text editor is used in the Bitrix OS.

To invoke the vi editor via SSH, use the following command:

vi file_name

Specify the file name in the current directory or the full path to the file (for example, /home/bitrix/www/.htaccess). If the file doesn't exist, the command will create it.

Upon the first launch, the vi editor is in reading mode.

To enter editing mode, press the "Insert" key on the keyboard (the sign "-- INSERT --" will appear at the bottom). Pressing the "Insert" key again will switch the editor to character replacement mode (the sign will change to "-- REPLACE --").

To exit the editing or replacement mode, press the "Esc" key, then enter one of the following commands:

  • :wq – exit and save changes;
  • :q! – exit without saving changes.

Further information about working with the vi editor can be found, for instance, here.

Optionally, you can install the nano editor, which is usually simpler to use, instead of vi.

To do this, execute the following command:

yum install -y nano

Have more questions about Hosting?