]> git.proxmox.com Git - mirror_frr.git/blame - doc/manpages/vtysh.rst
Merge pull request #10447 from ton31337/fix/json_with_whitespaces
[mirror_frr.git] / doc / manpages / vtysh.rst
CommitLineData
a1e276e1
QY
1*****
2VTYSH
3*****
4
12b7724f 5.. include:: defines.rst
11bb0051 6.. |DAEMON| replace:: vtysh
a1e276e1
QY
7
8SYNOPSIS
9========
10vtysh [ -b ]
11
12vtysh [ -E ] [ -d *daemon* ] [ -c *command* ]
13
14DESCRIPTION
15===========
16vtysh is an integrated shell for the FRRouting suite of protocol daemons.
17
18OPTIONS
19=======
20OPTIONS 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
11bb0051
DS
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
b993aae0
DA
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
5aa5df39
LB
60.. option:: -u, --user
61
a3ff0311
QY
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.
5aa5df39 65
a1e276e1
QY
66.. option:: -h, --help
67
68 Display a usage message on standard output and exit.
69
70ENVIRONMENT VARIABLES
71=====================
72VTYSH_PAGER
73 This should be the name of the pager to use. Default is more.
74
b993aae0
DA
75VTYSH_HISTFILE
76 Override the history file for vtysh commands. Logging can be turned off using ``VTYSH_HISTFILE=/dev/null vtysh``.
e6f83fc5 77 Environment is preferred way to override the history file path over command line argument (-H/--histfile).
b993aae0 78
a1e276e1
QY
79FILES
80=====
81|INSTALL_PREFIX_SBIN|/vtysh
82 The default location of the vtysh binary.
83
84|INSTALL_PREFIX_ETC|/vtysh.conf
85 The default location of the vtysh config file.
86
87|INSTALL_PREFIX_ETC|/frr.conf
88 The default location of the integrated FRRouting routing engine config file if integrated config file is in use.
89
90${HOME}/.history_frr
91 Location of history of commands entered via cli
92
93$(PWD)/|DAEMON|.log
94 If the |DAEMON| process is configured to output logs to a file, then you
95 will find this file in the directory where you started |DAEMON|.
96
97.. include:: epilogue.rst
98