Tips and Tricks
Table of contents
- 1 ‘vi’ and 'vim' text editors
- 2 ‘gedit’ graphical editor
- 3 ‘nano’ text editor
- 4 How to setup ‘ssh’ trusts between Linux and HP-UX
- 5 How to install 'rsh' on RHEL 8
- 6 How to setup ‘rsh’ trusts between Linux and HP-UX
- 7 Shutdown guests with Expect tool
- 7.1 Introduction
- 7.2 Script usage
- 8 How to restart CHARON-PAR on Linux automatically on failure
‘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/hostsfile for example (usingvifor 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:
|
On the Linux server, enter:
→ Do not specify any passphrase.
→ Enter the password for the copy operation to complete |
On the HP-UX system, add the Linux server key to the authorized keys:
|