]> git.proxmox.com Git - mirror_frr.git/blob - doc/manpages/vtysh.rst
Merge pull request #12837 from donaldsharp/unlikely_routemap
[mirror_frr.git] / doc / manpages / vtysh.rst
1 *****
2 VTYSH
3 *****
4
5 .. include:: defines.rst
6 .. |DAEMON| replace:: vtysh
7
8 SYNOPSIS
9 ========
10 vtysh [ -b ]
11
12 vtysh [ -E ] [ -d *daemon* ] [ -c *command* ]
13
14 DESCRIPTION
15 ===========
16 vtysh is an integrated shell for the FRRouting suite of protocol daemons.
17
18 OPTIONS
19 =======
20 OPTIONS available for the vtysh command:
21
22 .. option:: -b, --boot
23
24 Execute boot startup configuration. It makes sense only if integrated config file is in use (not default in FRRouting). See Info file frr for more info.
25
26 .. option:: -c, --command command
27
28 Specify command to be executed under batch mode. It behaves like -c option in any other shell - command is executed and vtysh exits.
29
30 It's useful for gathering info from FRRouting daemons or reconfiguring daemons from inside shell scripts, etc. Note that multiple commands may be executed by using more than one -c option and/or embedding linefeed characters inside the command string.
31
32 .. option:: -d, --daemon daemon_name
33
34 Specify which daemon to connect to. By default, vtysh attempts to connect to all FRRouting daemons running on the system. With this flag, one can specify a single daemon to connect to instead. For example, specifying '-d ospfd' will connect only to ospfd. This can be particularly useful inside scripts with -c where the command is targeted for a single daemon.
35
36 .. option:: -e, --execute command
37
38 Alias for -c. It's here only for compatibility with Zebra routing software and older FRR versions. This will be removed in future.
39
40 .. option:: -E, --echo
41
42 When the -c option is being used, this flag will cause the standard vtysh prompt and command to be echoed prior to displaying the results. This is particularly useful to separate the results when executing multiple commands.
43
44 .. option:: -C, --dryrun
45
46 When the -C option is being used, this flag will check the config for syntatic validity.
47
48 .. option:: -m, --markfile
49
50 Mark the input file with context ends, useful for cleanup of a config file that has a lot of extraneous space and end markers
51
52 .. option:: -n, --noerror
53
54 When executing cli that does not invoke a vtysh shell, if an error ocurrs ignore it for purposes of return codes from vtysh.
55
56 .. option:: -H, --histfile
57
58 Override the history file for vtysh commands. You can set ``vtysh -H /dev/null`` to turn logging of at all.
59
60 .. option:: -u, --user
61
62 Restrict access to configuration commands by preventing use of the "enable" command. This option provides the same limited "security" as password-protected telnet access. *This security should not be relied on in production environments.*
63
64 Caveat emptor: VTYSH was never designed to be a privilege broker and is not built using secure coding practices. No guarantees of security are provided for this option and under no circumstances should this option be used to provide any semblance of secure read-only access to FRR.
65
66 .. option:: -h, --help
67
68 Display a usage message on standard output and exit.
69
70 .. option:: -t, --timestamp
71
72 Print a timestamp before going to shell or reading the configuration file.
73
74 .. option:: --no-fork
75
76 When used in conjunction with ``-b``, prevents vtysh from forking children to handle configuring each target daemon.
77
78
79 ENVIRONMENT VARIABLES
80 =====================
81 VTYSH_PAGER
82 This should be the name of the pager to use. Default is more.
83
84 VTYSH_HISTFILE
85 Override the history file for vtysh commands. Logging can be turned off using ``VTYSH_HISTFILE=/dev/null vtysh``.
86 Environment is preferred way to override the history file path over command line argument (-H/--histfile).
87
88 FILES
89 =====
90 |INSTALL_PREFIX_SBIN|/vtysh
91 The default location of the vtysh binary.
92
93 |INSTALL_PREFIX_ETC|/vtysh.conf
94 The default location of the vtysh config file.
95
96 |INSTALL_PREFIX_ETC|/frr.conf
97 The default location of the integrated FRRouting routing engine config file if integrated config file is in use.
98
99 ${HOME}/.history_frr
100 Location of history of commands entered via cli
101
102 $(PWD)/|DAEMON|.log
103 If the |DAEMON| process is configured to output logs to a file, then you
104 will find this file in the directory where you started |DAEMON|.
105
106 .. include:: epilogue.rst
107