port

For network.

Get a free TCP port from system.

Command Type

built-in

Signature

> port {flags} (start) (end)

Parameters

  • start: The start port to scan (inclusive).
  • end: The end port to scan (inclusive).

Input/output types:

input output
nothing int

Examples

get a free port between 3121 and 4000

> port 3121 4000
3121

get a free port from system

> port

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.