Tips and Tricks

Tips and Tricks

Table of contents

‘vi’ and 'vim' text editors

Notes:

  • When typing text, press <ESC> once finished. In case you’re blocked, press also <ESC> before executing commands described below

  • both editors use case sensitive commands

Request

Command

To quit without saving

Press ‘:’ then enter ‘q!’

To quit with saving

Press ‘:’ then enter ‘x’ or ‘wq’

Go to  top of file

Press ‘:’ then enter ‘0’

Go to last line

Press ‘G’

Search pattern

Press ‘/’ then enter your search text. Press then ‘n’ for next (forward) or ‘N’ for backward

Remove current character

Press ‘x’

Insert text

Press ‘i’ (press ESC once text completed)

Insert line

Press ‘o’ for a line below cursor, ‘O’ for a line above cursor (press ESC once text completed)

Delete a line

Press ‘dd’

'vim' has also a graphical version named 'gvim'. If not installed, you can run: # yum -y install gvim

‘gedit’ graphical editor

‘gedit’ is a graphical text editor, users familiar with Windows notepad should not encounter difficulties to use it.

Request

Command

To quit

close the window by clicking on the cross top right corner

Save file

Press <CTRL-S>

‘nano’ text editor

‘nano’ is a basic text editor, very simple to use and displaying available commands at the bottom of the screen. For example, to leave ‘nano’ , use ^X (press CTRL + X)

How to setup ‘ssh’ trusts between Linux and HP-UX

Please note:

  • The prompts will tell you where to execute the commands, "HPUX#" (root user) or "Linux#"  (root user)

  • Remember Linux/Unix is case sensitive

  • If hosts are not known by each other, fill the /etc/hosts file for example (using vi for example)

  • linuxhost represents the name of your Charon server (can be any name you want)

  • hpuxhost represents the hostname of your HP-UX virtual machine

 

On the HP-UX system, enter the following commands if the folder does not already exist:

HPUX# mkdir /.ssh
HPUX# chmod 600 /.ssh

On the Linux server, enter:

Linux# ssh-keygen -t rsa

→  Do not specify any passphrase.

Linux# cd /root/.ssh
Linux# chmod 600 id_rsa*
Linux# scp id_rsa.pub hpuxhost:/.ssh/linuxhost_rsa.pub

→ Enter the password for the copy operation to complete

On the HP-UX system, add the Linux server key to the authorized keys:

HPUX# cd /.ssh
HPUX# cat linuxhost_rsa.pub >>authorized_keys
HPUX# chmod 600 authorized_keys



© Stromasys, 1999-2025  - All the information is provided on the best effort basis, and might be changed anytime without notice. Information provided does not mean Stromasys commitment to any features described. 
Need fast, reliable migration? We have done it countless times. Talk to an expert