Welcome to the Linux Foundation Forum!

What does this command do? (3.1, Step 4)

Options

Can someone please explain what this command is doing?

'echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null'

Thanks!

Answers

  • chrispokorni
    chrispokorni Posts: 2,187
    Options

    Hi @jtillinghast,

    The second command in lab 3.1 step 12:

    echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
    https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    

    adds the Docker repository to the apt (Ubuntu package manager) sources, to allow the containerd.io package to be installed on step 13.

    Regards,
    -Chris

  • jtillinghast
    Options

    Thanks, Chris. I think I get most of the components of the command, but why pipe output to /dev/null? Is that just to suppress output?

  • chrispokorni
    chrispokorni Posts: 2,187
    Options

    Hi @jtillinghast,

    Is that just to suppress output?

    Yes.

    Regards,
    -Chris

Categories

Upcoming Training