Linux on command

Updated: 04/26/2017 by Computer Hope

About on

On Solaris, the on command executes a command on a remote system, but with the local environment.

on syntax

on [ -i ] [ -d ] [ -n ] host-command [argument]


-i Interactive mode. Use remote echoing and special character processing. This option is needed for programs that expect to be talking to a terminal. All terminal modes and window size changes are propagated.
-d Debug mode. Print out some messages as work is being done.
-n No Input. This option causes the remote program to get EOF when it reads from the standard input, instead of passing the standard input from the standard input of the on program. For example, -n is necessary when running commands in the background with job control.
host-command The host command that you want to execute.
argument Additional arguments.

on examples

on ls

Runs the ls command on the domain

chkey — Change the secure RPC key pair on SunOS.
rlogin — Begin a session on a remote system.
rsh — Execute a command on a remote shell.
telnet — Connect to a remote system using the telnet protocol.