Thursday, September 2, 2021

Using the Linux set command

The Linux set command allows you to change the value of shell options or to display the names and values of shell variables. Rarely used, it is a bash builtin, but is quite a bit more complicated than most builtins.

If you use the command without any arguments, you will get a list of all the settings—the names and values of all shell variables and functions. Watch out though! You’ll end up with a torrent of output flowing down your screen. There are just short of 3,000 lines of output on my Fedora system:

$ set | wc -l
2954

The top of the list looks like what you see below, but the output gets considerably more complicated as you move through it.

To read this article in full, please click here


Thanks to Sandra Henry-Stocker (see source)

No comments:

Post a Comment