S6-GETSERVBYNAME(8)
β¨ S6-GETSERVBYNAME(8) β¨
okay so bestie, welcome to s6-getservbyname β it's a little command-line bestie for the getservbyname(3) function, and honestly? it's giving service name + protocol β port number conversion and it does it flawlessly. this lives in the System Manager's Manual, section 8, iykyk π
π NAME π
s6-getservbyname β a simple command-line interface to the getservbyname(3) function, converting a service name and protocol into a port number. that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
s6-getservbyname name proto
like. two args. that's the whole thing. iconic behavior honestly β¨
π¦ DESCRIPTION π¦
so what it does is: s6-getservbyname looks up the network services database for an entry containing name name and protocol proto. lowkey search-and-rescue but for services π
once it finds it, it prints the corresponding port number to stdout, then exits 0. slay. perfect. no notes π«Ά
and if it cannot find a related entry? it exits 1. that's the whole failure mode, bestie β no drama, no crash, just a very dignified 1 π
π§ EXAMPLES π§
on a standard machine with a correct /etc/services file and a non-garbled NSS configuration (fr fr, those matter):
s6-getservbyname smtp tcp
prints 25.
that's it. that's the example. she ate and left no crumbs π
π SEE ALSO π
this man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-networking/s6-getservbyname.html
go read the source bestie, it's highkey worth it π
π AUTHORS π
- Laurent Bercot
- Alexis <flexibeast@gmail.com> (man page port)
mwah π this lil page is brought to you by Debian, dated September 29, 2021, and it goes by S6-GETSERVBYNAME(8) in the System Manager's Manual β periodt, that's the sign-off, love u bye ππβ¨
π¦ where this page comes from
- nixpkgs unstable: s6-networking 2.8.0.1
- nixpkgs unstable: s6-networking-man-pages 2.7.2.1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms