Sample Header Ad - 728x90

multiple commands in linux shell

0 votes
1 answer
249 views
I have just come across an article describing process of installing containerD runtime and I'm a little dubious about the command mentioned, maybe a typo but I want to get clarity on it. The command is as follows curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.lis Now as far as I know the apt-key add - is used to add the key and the contents are read from the piped standard output for which - is there but what about the echo after it, if this is a separate command shouldn't it be separated by || or a semicolon ;? I know the command is fetching key from the repo and then updating the apt sources list but I'm confused about the syntax of the command.
Asked by JayD (103 rep)
Nov 24, 2023, 01:33 PM
Last activity: Nov 24, 2023, 03:01 PM