this post was submitted on 01 Jan 2024
161 points (81.6% liked)
Linux
48375 readers
1201 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Just as an addendum to your answer. In the command writing to
mullvad.list
the| sudo tee /etc/apt/sources.list.d/mullvad.list
is using two helpful linux utilities to modify the command. The first is the|
which is called a pipe and connects the text output of one program to the text input of another. The pipe is connecting the output of echo which simply prints a string, in this case composed of the outputs of several other commands to the programtee
. Tee which is given admin privileges by thesudo
takes an input stream and splits it between two files. In this case those aremullvad.list
and since no other was providedstdout
the output pipeline of the terminal running the command.EDIT:
In the interest of further completeness. Another utility used in those commands is the command substitution operator of
sh
. So when the terminal is interpretting text$(some command)
gets substituted out for the text output by the command in the parentheses. It is another common way of connecting commands on the shell to allow for more flexible and powerful commands.