scl(1)

πŸ“¦ version 2.0.3, in centos-stream 10, centos-stream 9, fedora 43, fedora 44

πŸ’– scl(1) β€” the General Commands Manual girlie πŸ’–

okay bestie, pull up a chair, because we're talking about scl β€” and she's from the General Commands Manual section, so you know she's legit. ✨

🌸 NAME 🌸

scl β€” Setup and run software from Software Collection environment

✨ SYNOPSIS ✨

scl enable|run [-x|--exec] <collection1> [<collection2> ...] <command>

scl load|unload <collection1> [<collection2> ...]

scl list-collections

scl list-enabled

scl list-packages <collection>

scl register <path>

scl deregister <collection> [-f|--force]

scl man <collection>

scl -V|--version

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, this manual page documents scl, which is a program that's basically a utility for running software that's packaged as a Software Collection. πŸ’…

the whole point of scl is that it lets you execute an application that is not located in the filesystem root hierarchy β€” she lives somewhere else, in an alternative location. 🏠➑️🏑 but plot twist: that application can still use and benefit from software that's installed in the root filesystem. iconic. so in order to let an application be visible to the system, you gotta use the scl utility as an interface. that's her job. that's her main character energy. πŸ‘‘

πŸŽ€ OPTIONS πŸŽ€

  • enable, run <collection1> [<collection2> ...] <command> [-x|--exec] β€” run <command> inside the environment of the given collections. each collection contains a module file that defines how the collection modifies the environment. first the environment gets modified according to the module files of the given collections, and then <command> is executed. control is handed back to the caller with the original environment as soon as <command> finishes. and if <command> is - (dash) then it's read from the standard input. πŸ“₯

if --exec is specified then the function exec() will be used for command execution, otherwise the function system() will be used. no cap.

Note: if you use a <command> that consists of multiple arguments, you either need to use quotes or the -- command separator. everything that follows the separator will be considered a command or its argument. πŸ™ˆ
Note: some commands modify the user environment in some way. those commands may potentially break SCLs, as their activation also usually depends on env. modification as well. typical examples of such commands are su and sudo. every collection modifies the environment differently, so more details may be found in the documentation of the particular collection. πŸ’€
  • load <collection1> [<collection2> ...] β€” load the given collections into the current shell. the environment of the current shell is modified according to the module files of the collections. this command properly works in these shells: bash, zsh, tcsh. you need to source /etc/profile.d/modules.sh and /etc/profile.d/scl-init.sh for this command to work in shells: dash, mksh, ksh. this command is not supported in other shells. 😭
  • unload <collection1> [<collection2> ...] β€” unload the given collections from the current shell. the environment of the current shell is returned back to the state it was in before loading the collections. this command properly works in these shells: bash, zsh, tcsh. you need to source /etc/profile.d/modules.sh and /etc/profile.d/scl-init.sh for this command to work in shells: dash, mksh, ksh. this command is not supported in other shells. 🫢
  • list-collections β€” lists all installed Software Collections on the system. so satisfying. ⭐
  • list-enabled β€” lists Software Collections enabled in the current shell. πŸ”₯
  • list-packages <collection1> <collection2> ... β€” if a collection name is specified, then the list of installed packages belonging to the collection is listed. πŸ“¦
  • register <path> β€” if <path> leads to a valid SCL file structure, scl will register that as a SCL. the <path> directory needs to contain a module file and a root directory to be considered a valid SCL. <path> needs to be an absolute path to the collection location. πŸ’œ
  • deregister <collection> [-f|--force] β€” <collection> will no longer be considered a SCL. if the <collection> was installed locally, then the use of --force is needed.i 🚨
  • man <collection> β€” show the manual page for <collection>. yes she reads too. πŸ“–
  • -v, --version β€” show version. 🌈

πŸ“ EXAMPLES πŸ“

scl enable example 'less --version'

runs the command 'less --version' in the environment with the collection 'example' enabled ✨

scl load foo bar

load foo and bar Software Collections into the current shell πŸ’–

scl unload foo bar

unload foo and bar Software Collections from the current shell πŸ¦‹

cat my_command | scl enable baz -

run the set of commands listed in the my_command file in the environment with the baz Software Collection enabled πŸŽ€

scl list-collections

list all installed collections ⭐

scl list-packages example

list all packages within the example collection πŸ“¦

scl register /foo/bar

registers a new collection with the name bar πŸ‘‘

scl deregister bar --force

forces the deregistration of the collection bar πŸ’…

a wrapper script must use proper quoting or a command separator like in the following examples πŸ‘‡

#!/bin/bash
COMMAND="ruby $(printf "%q " "$@")"
scl enable ruby193 "$COMMAND"
# or
scl enable ruby193 -- $COMMAND

🌟 AUTHOR 🌟

scl was written by Jindrich Novy <jnovy@redhat.com> and Jan Zeleny <jzeleny@redhat.com>. legends, fr fr. 🫢


and that's the whole page, bestie β€” scl(1), straight out of the General Commands Manual, and yes, this is the very last line of the page so we're done here. slay, go enable some collections πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from