NETCTL.PROFILE(5)

๐Ÿ’– NETCTL.PROFILE โ€” the manual page, bestie edition (5) ๐Ÿ’–

okay so you're here for netctl.profile(5)?? the profile options page?? iconic. let's go. this is part 1 of 3, so hydrate and stay with me ๐Ÿซถ


โœจ NAME โœจ

netctl.profile โ€” profile options. that's it, that's the name. short king energy. ๐Ÿ‘‘

๐ŸŒธ SYNOPSIS ๐ŸŒธ

netctl.profile

๐Ÿ’… DESCRIPTION ๐Ÿ’…

so. profiles for netctl live under /etc/netctl/ and they're literally just plain text files, no cap. they're made of variable definitions that follow bash shell syntax, and ngl they are not expected to execute any code โ€” this is a vibe situation, not a script situation. the move is to omit as much quoting as humanly possible. however, for a few WPA-related variables, special quoting rules apply (they're below, keep reading, don't scroll past me ๐Ÿ™ˆ).

the name of the profile is the name of the file. simple. elegant. and bestie, listen: profile names must not contain newlines, and should not end in .action, .conf, or .service. that's the rule. no exceptions, fr fr.

so whenever a profile is read, all the executable scripts in /etc/netctl/hooks/ get sourced, PLUS any executable script in /etc/netctl/interfaces/ that has the name of the interface for the profile. sneak peek behaviour, we love her โœจ

  • the name of the current profile is available via the Profile variable in the environment of the sourced scripts
  • on starting or stopping a profile, the respective command is available via the Command variable

and the hierarchy?? the tea: declarations in an interface script override declarations in a profile, which override declarations in hooks. that's the order. respect it.

also every connection type has example profile files chillin' in /etc/netctl/examples/ โ€” go look, they're free ๐Ÿ’–


๐ŸŒˆ AVAILABLE CONNECTION TYPES ๐ŸŒˆ

pick your fighter:

  • ethernet โ€” for wired connections. the classic. the OG. ๐Ÿ”Œ
  • wireless โ€” for wireless connections. this one requires wpa_supplicant to be available, so don't come crying if it's not installed ๐Ÿ˜ญ
  • bond โ€” for bonded interfaces.
  • bridge โ€” for bridge interfaces.
  • dummy โ€” for dummy interfaces.
  • ppp โ€” for PPP connections (currently only PPPoE, that's the limit bestie).
  • pppoe โ€” for PPPoE connections.
  • mobile_ppp โ€” for mobile broadband PPP connections that use a USB modem.
  • openvswitch โ€” for Open vSwitch bridge interfaces.
  • tunnel โ€” for tunnel interfaces.
  • tuntap โ€” for TUN/TAP interfaces.
  • vlan โ€” for VLANs on ethernet-like connections.
  • macvlan โ€” for MACVLANs on ethernet-like connections.
  • wireguard โ€” for WireGuard interfaces.

๐ŸŽ€ GENERAL OPTIONS ๐ŸŽ€

these are the universal girlies, everyone gets them:

  • Description= โ€” a description of the profile. basically a little bio. make it cute. ๐Ÿ’…
  • Connection= โ€” [mandatory for all profiles] the connection type used by the profile. required, babes, no skipping.
  • Interface= โ€” [mandatory for all profiles] the name of the associated network interface. โš ๏ธ the interface name should not be quoted โ€” just say the name, raw, unquoted, unbothered.
  • BindsToInterfaces=() โ€” an array of physical network interfaces that this profile needs before it can be started. for 'enabled' profiles, systemd will literally wait for the presence of the specified interfaces before starting a profile. if you don't specify this variable, it defaults to the value of Interface=. she's self-sufficient like that.
  • MACAddress= โ€” optional MAC address for newly created interfaces. when set to the name of an existing interface, the address of that interface is used. the connection types that create an interface AND are able to set a MAC address are bond, bridge, dummy, vlan, and macvlan. that's the whole list, don't @ me.
  • After=() โ€” an array of profile names that should be started before this profile is started. careful though: this is only an ordering dependency, it is not intended to be a list of profiles that this profile requires. the meaning is the same as After= in systemd.unit(5). it's giving "after you, no after YOU" ๐Ÿฆ‹
  • WaitOnline= โ€” set to yes to consider the profile activated only when it is online. defaults to no.
  • ExecUpPost= โ€” a command that is executed after a connection is established. if the specified command returns anything other than 0 (success), netctl will abort and stop the profile. if you want the command to be allowed to fail, add || true to the end of it. chaos-proof it ๐Ÿ’€
  • ExecDownPre= โ€” a command that is executed before a connection is brought down. similar precautions should be taken as with ExecUpPost=. same energy, different direction.
  • TimeoutUp โ€” maximum time, in seconds, to wait for an interface to get up. defaults to 5.
  • ForceConnect= โ€” set to yes to force connecting even if the interface is up. ๐Ÿšจ do not use this unless you know what you are doing. i'm serious. this is not a vibe-check situation, this is a "you better know what you're doing" situation.
  • ExcludeAuto= โ€” whether or not to exclude this profile from automatic profile selection. defaults to no for wireless and DHCP enabled connections, and to yes otherwise.
  • NETCTL_DEBUG= โ€” set to yes to generate debugging output. turn it on when things are cursed ๐Ÿ”ฅ

๐Ÿงš IP OPTIONS ๐Ÿงš

these options apply to all connections that set up an IP-enabled network. in particular, these connection types are: ethernet, wireless, bond, bridge, tunnel, tuntap, and vlan. so basically the whole squad.

  • IP= โ€” [mandatory for IPv4] one of static, dhcp, or no, depending on the desired way of obtaining an address.
  • IP6= โ€” [mandatory for IPv6] one of static, stateless, dhcp-noaddr, dhcp, no, or left out (empty) altogether. and here's the subtle flex: the difference between not specifying and setting to no is in the handling of router advertisement packages, which is blocked by no. so no is not the same as nothing. write that down ๐Ÿ“
  • Address=() โ€” [requires IP=static] an array of IP addresses suffixed with /<netmask>. leaving out the brackets for arrays consisting of a single element is accepted in the Bash syntax. we're being lenient, we're being nice ๐Ÿซถ
  • Gateway= โ€” [requires IP=static] an IP routing gateway address.
  • Routes=() โ€” an array of custom routes of the form:
<address range> via <gateway>
  • Address6=() โ€” [requires IP6=static or IP6=stateless] an array of IPv6 addresses. prefix length may be specified via the 1234:bcd::11/64 syntax. and yes you can specify modifiers โ€” in particular, 1234:bcd::11/64 nodad disables Duplicate Address Detection for the address. fancy โœจ
  • Gateway6= โ€” [requires IP6=static or IP6=stateless] an IPv6 routing gateway address.
  • Routes6=() โ€” an array of custom routes of the form:
<address range> via <gateway>
  • DHCPClient= โ€” [requires IP=dhcp] the name of the DHCP client to use. by default, netctl comes with support for dhcpcd and dhclient. clients may accept additional options through client-specific variables: command line options for dhcpcd(8) are read from DhcpcdOptions= (defaults to -L), and command line options for dhclient(8) are read from DhclientOptions=. defaults to dhcpcd.
  • DHCP6Client= โ€” [requires IP6=dhcp or IP6=dhcp-noaddr] the name of the DHCPv6 client to use. by default, dhcpcd and dhclient are supported. command line options for the IPv6 instance of dhcpcd(8) are read from DhcpcdOptions6=, and command line options for the IPv6 instance of dhclient(8) are read from DhclientOptions6=. defaults to dhclient. yes, the v6 default is different from the v4 default. she contains multitudes ๐Ÿ’œ
  • DHCPReleaseOnStop= โ€” set to yes to release the DHCP lease when the profile is stopped. let it go, girl ๐ŸŒธ
  • IPCustom=() โ€” an array of argument lines to pass to ip. this can be used to achieve complicated configurations within the framework of netctl. for the overachievers.
  • Hostname= โ€” a transient hostname for the system. a little name tag, but temporary.
  • DNS=() โ€” an array of DNS nameservers. simply specify the IP addresses of each of the DNS nameservers. no extra steps, babes.
  • DNSDomain= โ€” a domain line for /etc/resolv.conf, passed to resolvconf(5).
  • DNSSearch= โ€” a search line for /etc/resolv.conf, passed to resolvconf(5).
  • DNSOptions=() โ€” an array of options lines for /etc/resolv.conf, passed to resolvconf(5).
  • TimeoutDHCP= โ€” maximum time, in seconds, to wait for DHCP to be successful. defaults to 30. be patient with her ๐Ÿ˜ญ
  • TimeoutDAD= โ€” maximum time, in seconds, to wait for IPv6's Duplicate Address Detection to succeed. defaults to 3.
  • SkipDAD= โ€” whether or not to bypass Duplicate Address Detection altogether. defaults to no.

๐Ÿฆ‹ OPTIONS FOR 'ETHERNET' CONNECTIONS ๐Ÿฆ‹

next to the ip options (yeah, all of those up there still apply), the following are understood for connections of the ethernet type:

  • Auth8021X= โ€” set to yes to use 802.1x authentication.
  • WPAConfigFile= โ€” path to a wpa_supplicant configuration file. defaults to /etc/wpa_supplicant.conf.
  • WPADriver= โ€” the wpa_supplicant driver to use for 802.1x authentication. defaults to wired.
  • TimeoutCarrier= โ€” maximum time, in seconds, to wait for a carrier. defaults to 5.
  • TimeoutWPA= โ€” maximum time, in seconds, to wait for 802.1x authentication to succeed. defaults to 15.
  • SkipNoCarrier= โ€” whether or not the absence of a carrier (a plugged-in cable, bestie, an actual cable) is acceptable. defaults to no.
  • Priority= โ€” priority level of the profile. in case of automatic profile selection, profiles are tried in decreasing order of priority. defaults to 1 in DHCP enabled profiles and to 0 otherwise. so yeah, higher number = tried first. main character energy ๐Ÿ‘‘

okay that's the first chunk!! there are more parts coming, so do NOT close the tab, we're not done yet ๐Ÿ’–

๐Ÿ’– OPTIONS FOR โ€˜WIRELESSโ€™ CONNECTIONS ๐Ÿ’–

okay bestie, so besides all the ip options you already learned, wireless connections also understand the stuff below. wifi girlies rise ๐Ÿฆ‹โœจ

  • Security= โ€” one of โ€˜noneโ€™, โ€˜wepโ€™, โ€˜wpaโ€™, โ€˜wpa-configsectionโ€™, or โ€˜wpa-configโ€™. Defaults to โ€˜noneโ€™. pick your fighter ๐Ÿ’…
  • ESSID= [mandatory] โ€” the name of the network you're connecting to. Special quoting rules apply (they're explained somewhere below, iykyk). yes it's mandatory, no you can't skip it ๐Ÿ™ˆ
  • AP= โ€” the BSSID (that's a MAC address, bestie) of the access point you want to connect to.
  • Key= โ€” the secret key to a WEP or WPA encrypted network. Special quoting rules apply here too ๐Ÿ”
  • Hidden= โ€” whether or not the network you specified is a hidden network. Defaults to โ€˜noโ€™.
  • AdHoc= โ€” whether or not to use ad-hoc mode. Defaults to โ€˜noโ€™.
  • ScanFrequencies= โ€” a space-separated list of frequencies (in MHz, obviously) to scan when searching for the network. Defaults to all available frequencies. it's giving "scan everything" energy โœจ
  • Frequency= โ€” a frequency in MHz to use in ad-hoc mode when a new IBSS is created (aka when the network isn't already there).
  • Priority= โ€” priority group for the network. When automatic profile selection happens, the matched network with the highest priority wins. Defaults to โ€˜0โ€™. main character network only ๐Ÿ‘‘
  • WPAConfigSection=() [mandatory for Security=wpa-configsection] โ€” an array of lines that make up a network block for wpa_supplicant. Heads up: all of the options above get ignored. all of them. ๐Ÿ’€
  • WPAConfigFile= โ€” path to a wpa_supplicant configuration file. Only used for Security=wpa-config. Every option except WPADriver=, TimeoutWPA=, and RFKill= gets ignored. Also, the profile is excluded from automatic profile selection. Defaults to /etc/wpa_supplicant.conf.
  • Country= โ€” the country for which frequency regulations will be enforced.
  • WPAGroup= โ€” the group that has the authority to configure wpa_supplicant via its control interface. Defaults to โ€˜systemd-networkโ€™.
  • WPADriver= โ€” the wpa_supplicant driver to use. Defaults to โ€˜nl80211,wextโ€™.
  • TimeoutWPA= โ€” the maximum time, in seconds, to wait for steps in the association and authentication to succeed. Defaults to โ€˜15โ€™. tick tock โฐ
  • RFKill= โ€” the name of an rfkill device. When you specify one, that device gets used to block/unblock the interface when appropriate. You can find names in /sys/class/rfkill/rfkillX/name. You can also set this variable to โ€˜autoโ€™ โ€” in that case, an rfkill device that's associated with the network interface gets used. so convenient fr fr

๐Ÿ”ฅ OPTIONS FOR โ€˜BONDโ€™ CONNECTIONS ๐Ÿ”ฅ

the interfaces listed in BindsToInterfaces= get bound together into the interface named by Interface=. Next to the ip options, here's what bond connections understand:

  • Mode= โ€” the bonding policy. Go read the kernel documentation on bonding for the deets.
  • LinkOptions= โ€” extra options to pass to ip link. Run ip link add type bond help to see what's available.

๐ŸŒˆ OPTIONS FOR โ€˜BRIDGEโ€™ CONNECTIONS ๐ŸŒˆ

the interfaces in BindsToInterfaces= take part in the bridge named by Interface=. Next to the ip options, bridge connections understand this:

  • SkipForwardingDelay= โ€” skip (R)STP and immediately activate all bridge members. This can be useful when DHCP is used on the bridge. no waiting, we go now ๐Ÿ’จ

๐ŸŽ€ OPTIONS FOR โ€˜DUMMYโ€™ CONNECTIONS ๐ŸŽ€

the name of the dummy interface goes in Interface=. Only the ip options are understood for connections of the โ€˜dummyโ€™ type. that's it, that's the whole section, lowkey iconic for how simple it is โœจ


๐Ÿ’œ OPTIONS FOR โ€˜PPPโ€™ CONNECTIONS ๐Ÿ’œ

this connection type is literally identical to the โ€˜pppoeโ€™ type below, except the ethernet interface gets specified in BindsToInterfaces=. Also, the value of Interface= has to be of the form โ€˜ppp<n>โ€™, where n gets passed on to PPPUnit=.


๐Ÿซถ OPTIONS FOR โ€˜PPPOEโ€™ CONNECTIONS ๐Ÿซถ

the interface to dial peer-to-peer over ethernet goes in Interface=. Here's what โ€˜pppoeโ€™ connections understand:

  • User= and Password= โ€” the username and password to connect with.
  • ConnectionMode= โ€” one of โ€˜persistโ€™ or โ€˜demandโ€™, depending on how a connection should be established. Defaults to โ€˜persistโ€™.
  • IdleTimeout= [requires ConnectionMode=demand] โ€” the idle time (in seconds) after which the PPP daemon should disconnect.
  • MaxFail= โ€” the number of consecutive failed connection attempts to tolerate. A value of 0 means no limit. Defaults to โ€˜5โ€™.
  • DefaultRoute= โ€” whether or not to use the default route provided by the peer. Defaults to โ€˜yesโ€™.
  • UsePeerDNS= โ€” whether or not to use the DNS servers provided by the peer. Defaults to โ€˜yesโ€™.
  • PPPUnit= โ€” the PPP unit number in the interface name (โ€˜ppp0โ€™, โ€˜ppp1โ€™, etc.).
  • LCPEchoInterval= and LCPEchoFailure= โ€” these options override default LCP parameters from /etc/ppp/options.
  • OptionsFile= โ€” a file to read additional pppd(8) options from.

and the following advanced options are understood too, bestie, don't skip these:

  • PPPoEService= โ€” the PPPoE service name.
  • PPPoEAC= โ€” the PPPoE access concentrator name.
  • PPPoESession= โ€” an existing session to attach to. This option is of the form โ€˜sessid:macaddrโ€™.
  • PPPoEMAC= โ€” a MAC address to restrict the connection to.
  • PPPoEIP6= โ€” whether or not to enable IPv6CP and IPv6 protocols. When set to โ€˜noโ€™, IPv6CP negotiation and IPv6 communication is explicitly disabled.

๐Ÿฆ‹ OPTIONS FOR โ€˜MOBILE_PPPโ€™ CONNECTIONS ๐Ÿฆ‹

the name of the USB serial device goes in Interface=. Here's what โ€˜mobile_pppโ€™ connections understand:

  • User= and Password= โ€” the username and password to connect with. These are unset by default, because they're often not required. nice.
  • AccessPointName= โ€” the access point name (APN) to present to the carrier. This one's specific to your ISP, so yeah, you gotta know it.
  • Pin= โ€” if your modem requires a PIN to unlock, set it here. ๐Ÿ”ข
  • PhoneNumber โ€” the number to dial. Defaults to โ€˜*99#โ€™.
  • Mode= โ€” the connection mode. Can be one of โ€˜3Gprefโ€™, โ€˜3Gonlyโ€™, โ€˜GPRSprefโ€™, โ€˜GPRSonlyโ€™, โ€˜Noneโ€™, or a custom AT^SYSCFG=... line specified as โ€˜SYSCFG=...โ€™. This generates AT commands specific to certain Huawei modems โ€” all other devices should leave this option unset or set to โ€˜Noneโ€™. don't be out here setting Huawei stuff on your not-Huawei modem, bestie, that's a whole vibe check fail ๐Ÿ’€
  • Init= โ€” an initialization string sent to the modem before dialing. This string gets sent after sending โ€œATZโ€. Defaults to โ€˜ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0โ€™.
  • ChatScript= โ€” path to a chat file. If you specify one, no chat script will be generated and all of the options above except User= and Password= get ignored.
  • MaxFail= โ€” the number of consecutive failed connection attempts to tolerate. A value of 0 means no limit. Defaults to โ€˜5โ€™.
  • DefaultRoute= โ€” whether or not to use the default route provided by the peer. Defaults to โ€˜yesโ€™.
  • UsePeerDNS= โ€” whether or not to use the DNS servers provided by the peer. Defaults to โ€˜yesโ€™.
  • PPPUnit= โ€” the PPP unit number in the interface name (โ€˜ppp0โ€™, โ€˜ppp1โ€™, etc.).
  • OptionsFile= โ€” a file to read additional pppd(8) options from.
  • RFKill= โ€” the name of an rfkill device. When specified, the device gets used to block/unblock the interface when appropriate. You can find names in /sys/class/rfkill/rfkillX/name. (no โ€˜autoโ€™ here, just so you know โ€” that was the wireless one ๐Ÿซถ)

โญ OPTIONS FOR โ€˜OPENVSWITCHโ€™ CONNECTIONS โญ

the interfaces in BindsToInterfaces= take part in the bridge named by Interface=. Only the ip options are understood for connections of the โ€˜openvswitchโ€™ type. short and sweet โœจ


๐ŸŒธ OPTIONS FOR โ€˜TUNNELโ€™ CONNECTIONS ๐ŸŒธ

the name of the tunnel interface goes in Interface=. Next to the ip options, โ€˜tunnelโ€™ connections understand:

  • Mode= โ€” the tunnel type (e.g. โ€˜sitโ€™). See ip-tunnel(8) for the available modes.
  • Local= โ€” the address of the local end of the tunnel.
  • Remote= โ€” the address of the remote end of the tunnel.
  • Key= [requires Mode=gre] โ€” a key identifying an individual traffic flow within a tunnel.

๐Ÿ“ OPTIONS FOR โ€˜TUNTAPโ€™ CONNECTIONS ๐Ÿ“

the name of the tuntap interface goes in Interface=. Next to the ip options, โ€˜tuntapโ€™ connections understand:

  • Mode= โ€” either โ€˜tunโ€™, or โ€˜tapโ€™.
  • User= โ€” the owning user of the tun/tap interface.
  • Group= โ€” the owning group of the tun/tap interface.

๐Ÿ‘‘ OPTIONS FOR โ€˜VLANโ€™ CONNECTIONS ๐Ÿ‘‘

the name of the vlan interface goes in Interface=. The underlying physical interface goes in BindsToInterfaces=. So for vlan profiles, BindsToInterfaces= holds the name of a single network interface โ€” just one, no plural shenanigans.

All the options for connections of the โ€˜ethernetโ€™ type are understood for connections of the โ€˜vlanโ€™ type. On top of that, โ€˜vlanโ€™ connections must set a vlan identifier using VLANID=. See ip(8) for details. mandatory, fr fr ๐Ÿ’…


๐Ÿงš OPTIONS FOR โ€˜MACVLANโ€™ CONNECTIONS ๐Ÿงš

the name of the macvlan interface goes in Interface=. The underlying physical interface goes in BindsToInterfaces=. So for macvlan profiles, BindsToInterfaces= holds the name of a single network interface, same deal as vlan.

All the options for connections of the โ€˜ethernetโ€™ type are understood for connections of the โ€˜macvlanโ€™ type. And next to the ip options, โ€˜macvlanโ€™ connections also understand:

  • Mode= โ€” either โ€˜bridgeโ€™, โ€˜vepaโ€™, โ€˜privateโ€™, or โ€˜passthruโ€™. See ip(8) for details.

๐Ÿ’ซ OPTIONS FOR โ€˜WIREGUARDโ€™ CONNECTIONS ๐Ÿ’ซ

the name of the WireGuard interface goes in Interface=. Next to the ip options, โ€˜wireguardโ€™ connections understand one iconic little thing:

  • WGConfigFile= โ€” path to a WireGuard configuration file. Defaults to /etc/wireguard/$Interface.conf.

and that's where this part wrapsโ€ฆ except it doesn't, because there's more coming ๐Ÿ’–

โœจ SPECIAL QUOTING RULES โœจ

okay bestie, buckle up because this is the โœจweirdโœจ part. wpa_supplicant config files use non-standard quoting โ€” like, they did NOT follow the normal rules, they chose chaos ๐Ÿ’€ โ€” and because we're out here generating those files for you, netctl has to have its own lil quoting rules too. These apply to some variables for connections of the โ€˜wirelessโ€™ type. Specifically? These two, bestie:

  • ESSID=
  • Key=

so yeah, just those. ๐Ÿ’…

Here's the tea on how wpa_supplicant itself thinks about this:

  • A variable counts as quoted by wpa_supplicant if it's enclosed in double quotes ("). ๐ŸŽ€
  • A variable counts as non-quoted by wpa_supplicant if it does โœจnotโœจ start with a double quote.
  • Hexadecimal values are specified non-quoted in config files of wpa_supplicant.

But netctl does it differently by default: in netctl, variables are written to wpa_supplicant configuration files quoted by default. And so, when special quoting rules apply, it is possible to specify an unquoted (hexadecimal) value using a special syntax. iconic, honestly ๐Ÿซถ

So what ARE netctl's special quoting rules? say it with me:

  • A string that starts with a literal double quote is considered non-quoted.
  • Any other string is considered quoted. periodt.

And yeah, you can specify quoted strings that start with a double quote โ€” you just have to quote manually, bestie. โœจ

The most unhinged example, the extreme one: specifying a quoted double quote:

X='""""'

๐Ÿ˜ญ she's a menace. And on the total opposite end of the spectrum, there's the non-quoted backslash:

X=\"\\

Further examples of quoted strings โ€” all equivalent, no cap:

X=string
X="string"
X='""string"'

Further examples of non-quoted strings โ€” also all equivalent:

X=\"string
X="\"string"
X='"string'

And here's the mnemonic to remember all of this ๐Ÿงš: think of the prefix โ€˜\"โ€™ as saying โ€˜nonโ€™-โ€˜quoteโ€™. that's it. that's the trick. iykyk ๐Ÿ’œ


๐ŸŒˆ SEE ALSO ๐ŸŒˆ


and that's the whole page bestie, you made it to the end ๐Ÿฅณ this one's from the netctl.profile(5) era, dated 01/26/2026 โ€” go forth and configure your little heart out, you absolute main character ๐Ÿ‘‘๐Ÿ’–

๐Ÿ“ฆ where this page comes from