next up previous contents
Next: ip error Up: ip-cref Previous: About this document   Contents

ip -- command syntax

The generic form of an ip command is:

where OPTIONS is a set of optional modifiers affecting the general behaviour of the ip utility or changing its output. All options begin with the character '-' and may be used in either long or abbreviated forms. Currently, the following options are available:

OBJECT is the object to manage or to get information about. The object types currently understood by ip are:

Again, the names of all objects may be written in full or abbreviated form, f.e. address is abbreviated as addr or just a.

COMMAND specifies the action to perform on the object. The set of possible actions depends on the object type. As a rule, it is possible to add, delete and show (or list) objects, but some objects do not allow all of these operations or have some additional commands. The help command is available for all objects. It prints out a list of available commands and argument syntax conventions.

If no command is given, some default command is assumed. Usually it is list or, if the objects of this class cannot be listed, help.

ARGUMENTS is a list of arguments to the command. The arguments depend on the command and object. There are two types of arguments: flags, consisting of a single keyword, and parameters, consisting of a keyword followed by a value. For convenience, each command has some default parameter which may be omitted. F.e. parameter dev is the default for the ip link command, so ip link ls eth0 is equivalent to ip link ls dev eth0. In the command descriptions below such parameters are distinguished with the marker: ``(default)''.

Almost all keywords may be abbreviated with several first (or even single) letters. The shortcuts are convenient when ip is used interactively, but they are not recommended in scripts or when reporting bugs or asking for advice. ``Officially'' allowed abbreviations are listed in the document body.

next up previous contents
Next: ip error Up: ip-cref Previous: About this document   Contents
Martin A. Brown 2003-03-14