NGCTL(8)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

πŸ’… ngctl(8) β€” netgraph control utility πŸŽ€

okay so bestie, welcome to ngctl, the netgraph control utility, and honestly? she's iconic. let me walk you through it πŸ’–


✨ SYNOPSIS ✨

ngctl [-j jail] [-d] [-f filename] [-n nodename]
      [command [argument ...]]

like, that's the whole vibe. short. slay. moving on 🫢


🌸 DESCRIPTION 🌸

so ngctl straight up creates a new netgraph node of type socket, and you use that bad boy to issue netgraph commands. that's her whole job. main character energy fr fr.

now here's the mood logic, listen up πŸ‘‘

  • if no -f flag is given,
  • AND no command is supplied on the command line,
  • AND standard input is a tty,

…then ngctl drops into interactive mode. otherwise? she executes whatever command(s) you handed her and dips immediately. periodt. πŸ’…

nodes can be created, removed, joined together, etc. β€” the whole glow-up pipeline. and ASCII formatted control messages can be sent to any node, but only if that node supports binary/ASCII control message conversion. iykyk ✨

in interactive mode, ngctl will display any control messages and data packets received by the socket node. and for control messages specifically, the message arguments get displayed in ASCII form if the originating node supports conversion. no conversion, no ASCII, that's just how it is 😭

the options are as follows, and yes i'm listing every single one because we don't skip πŸ’œ


πŸ¦‹ OPTIONS πŸ¦‹

  • -f filename β€” read commands from the named file. a single dash (-) means standard input. blank lines and lines starting with a # are ignored (comments, we love her 🌸). note: when the -j jail option is specified, the file will be opened before attaching to the jail and then be processed inside the jail. order of operations matters, bestie πŸŽ€
  • -j jail β€” perform the actions inside the jail. ngctl will first attach to the jail (by jail id or jail name) before performing the effects. this lets netgraph nodes of a jail be created, modified, and destroyed even if the ngctl binary is not available in the jail. sneaky and iconic πŸ”₯
  • -n nodename β€” assign nodename to the newly created netgraph node. the default name is ngctlXXX where XXX is the process ID number. cute little auto-naming moment πŸ’–
  • -d β€” increase the debugging verbosity level. press it again for more chaos, it just keeps going πŸ“ˆ

πŸ‘‘ COMMANDS πŸ‘‘

the currently supported commands in ngctl are β€” brace yourself, it's a whole roster:

  • config β€” get or set configuration of node at <path>
  • connect β€” Connects hook <peerhook> of the node at <relpath> to <hook>
  • debug β€” Get/set debugging verbosity level
  • dot β€” Produce a GraphViz (.dot) of the entire netgraph.
  • help β€” Show command summary or get more help on a specific command
  • list β€” Show information about all nodes
  • mkpeer β€” Create and connect a new node to the node at "path"
  • msg β€” Send a netgraph control message to the node at "path"
  • name β€” Assign name <name> to the node at <path>
  • read β€” Read and execute commands from a file
  • rmhook β€” Disconnect hook "hook" of the node at "path"
  • show β€” Show information about the node at <path>
  • shutdown β€” Shutdown the node at <path>
  • status β€” Get human readable status information from the node at <path>
  • types β€” Show information about all installed node types
  • write β€” Send a data packet down the hook named by "hook".
  • quit β€” Exit program

some commands have aliases, e.g., ls is the same as list β€” twinning fr fr πŸ‘―β€β™€οΈ and the help command displays the available commands, their usage and aliases, and a brief description. she's helpful like that 🫢


πŸ’€ EXIT STATUS πŸ’€

ngctl exits 0 on success, and >0 if an error occurs. simple. clean. no notes ✨


🌈 SEE ALSO 🌈

go read them, bestie, they're right there πŸ“š


🧚 HISTORY 🧚

the netgraph system was designed and first implemented at Whistle Communications, Inc. in a version of FreeBSD 2.2 customized for the Whistle InterJet. vintage. historical. lowkey legendary πŸ‘‘


πŸ“ AUTHORS πŸ“

Archie Cobbs <archie@whistle.com> πŸ’Œ


ok that's the whole page, no cap. go forth and netgraph responsibly, bestie πŸ’…βœ¨

mwah πŸ’‹ this edition shipped on the Debian flavor of things, dated August 29, 2025 β€” catch you in the next manpage, love u πŸŽ€πŸ’–

πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms