switchconf(8)
π switchconf(8) β System Manager's Manual π
okay bestie, listen up, this is switchconf from the System Manager's Manual, and it's genuinely one of those tiny tools that just works. iykyk. π¦
β¨ NAME β¨
switchconf β Change system configuration to one of many predefined
πΈ SYNOPSIS πΈ
switchconf [ -f conf_file ] -help | -list | config_scheme
π DESCRIPTION π
so switchconf is a command line tool that helps nomad laptop users easily change their configuration. that's it. that's the vibe. you're a laptop girlie who moves between networks and setups, and this is your bestie that swaps your whole config for you. no cap. π
β¨ OPTIONS β¨
switchconf takes only one mandatory argument. just one. one (1). here's what it can be:
- if that argument is
-helpβ the command synopsis gets output. that's it, that's the whole job. π - if it's
-listβ you get a list of all known configuration schemes returned for the current set (found in$conf_top_dirs). shopping menu energy. ποΈ - if the argument is a configuration scheme β that configuration will be installed on the laptop. slay. π₯
and then there's the optional one, which must come first:
-fβ flags an optional argument that specifies the set of configuration schemes to work with. it names a configuration file, with the format described below, located on the current directory. if you don't pass it, the default file/etc/switchconf/confis used. defaults are iconic honestly. π
π§ CONFIGURATION FILE π§
the configuration file (default /etc/switchconf/conf) is simple. literally. here are the entries that are defined:
conf_top_dirsβ this specifies where the configuration schemes are located.dest_dirβ this specifies which top directory you want to install the new configuration into. this one is pretty useful if you want to debug your configuration without overwriting the actual one. safety first bestie π«Άexec_dir_before,exec_dir_afterβ this specifies the name of the exec directory: all files included in it will be executed before or after configuration changes. order matters, we love a sequence. β¨run_partsβ this specifies the path to therun-partscommand, which is used to execute the scripts. leave it empty to use the internal implementation ofrun-parts. your choice, main character. πconfig_methodβ this specifies the method used to copy the configuration files to their places:softlink,hardlink,copy. three options, all valid, pick your fighter. π
β οΈ ok important one: /etc/switchconf/conf should be written so it is parsable as a shell script β there should be no spaces between the variable name and its value. no spaces. zero. don't do it. i'm begging. π
π¦ SCHEMES π¦
you should create a directory for each configuration scheme you define, including all the files it should set in the system. inside /etc/switchconf, in the directories, you should create the files including the full path β i.e., /etc/switchconf/home/etc/network/interfaces for /etc/network/interfaces. so extra but it makes sense, trust. π
π¨ no scheme should be named as either theexec_dir_beforeor theexec_dir_after, unless theconf_top_dirsis moved out of its default directory,/etc/switchconf. name collision = chaos. don't.
and even though it's not really necessary, you should probably ensure that all the files existing in one of the schemes exist on every other scheme, in order to ensure you do not end up in a hybrid state. hybrid state is giving cursed. π keep your schemes consistent bestie.
π FILES π
/etc/switchconf/confβ Configuration file./var/lib/misc/switchconf.lastcfgβ Memory file, has the name of the current active scheme. she remembers. π§ β¨/var/lock/switchconfβ Lock file.
π BUGS π
actually no bugs are reported. not one. we're clean. we're flawless. periodt. π β¨
πΈ AUTHOR πΈ
switchconfwas written by Sebastien J. Gross<seb@sjgross.org>switchconfwas contributed by Julien Ducros<jul@chezwam.org>switchconfwas maintained by Jose Calhariz<jose.calhariz@tagus.ist.utl.pt>
and that's the whole page bestie!! π this was 3rd Berkeley Distribution, dated February 2014 β yeah she's a vintage icon, and she still ate. mwah. ππ«Ά go switch some confs. slay. π
π¦ where this page comes from
- debian bookworm: switchconf 0.0.17-1.1
- debian trixie: switchconf 0.0.17-1.2
- ubuntu jammy: switchconf 0.0.17-1
- ubuntu noble: switchconf 0.0.17-1.1
- ubuntu questing: switchconf 0.0.17-1.2
- ubuntu resolute: switchconf 0.0.17-1.2build1
- ubuntu stonking: switchconf 0.0.17-1.2build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms