Apple Remote Desktop User Manual

Page 89

Advertising
background image

Chapter 3

Administering Computers

89

networksetup
The command-line tool networksetup is used to configure a client’s network settings. It
can create or modify network locations, change IP addresses, set network service
proxies, and much more. You will find the command-line syntax, explanations, and an
example in the tool’s help prompt, by entering the following as one line in Terminal:

/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/

networksetup -help

systemsetup
The command-line tool systemsetup is used to configure other non-network system
settings. It can query or alter time zones, network time servers, sleep settings, Energy
Saver preferences, Remote Login (ssh) preferences, and more. You will find the
command-line syntax, explanations, and example in the tool’s help prompt, by entering
the following as one line in the Terminal:

/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/

systemsetup -help

Executing a Single UNIX Command

Using the UNIX Command window, you can send a single command to the selected
client computers. The command is executed using the bash shell and root permissions.

To execute a single UNIX command:

1

Select a computer list.

2

Select one or more computers in the Remote Desktop window.

3

Choose Manage > Send UNIX Command.

4

Type or paste the command.

If your command is a multi-line script, enter each command on its own line. If you want
to break up a single line command for better readability, use a back slash (“\”) to begin
a new visual line.

5

Set the user whose permissions are used to execute the command.

You can choose the currently logged in user, or choose the name of any other user
known to exist on the client computers.

6

Click Send.

Executing Scripts Via UNIX Command

There are two kinds of scripts you can execute via the command line. First, and most
common with command-lines, is a shell script. A shell script is a file that contains a
collection of UNIX commands that are all executed in the sequence in the file. Shell
scripts can have normal programming procedures like loops, conditionals, and
variables. Shell scripts are text files with UNIX line endings. Shell scripts are interpreted
using the bash shell.

Advertising