Announcement

Collapse
No announcement yet.

sudo apt command doesn't show any output in the terminal - Ubuntu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sudo apt command doesn't show any output in the terminal - Ubuntu

    Hello,

    Whenever we have to install any packages in Ubuntu, we are using the following command:

    sudo apt-get install <package-name>

    With redirection as follows will save all the logs in a file:

    sudo apt-get install <package-name> > Log.txt

    But the above command doesn't show any output in the terminal.

    How we can save all the logs in the file and can also be view it on terminal?

  • #2
    Yes.. You have to use tee to achieve that.

    sudo apt-get install <package-name> | tee Log.txt

    Comment


    • #3
      Much appreciated. tee looks great. One all the more thing, it overwrites logs for each command. How might we add new logs into a similar document utilising tee because generally I guess we can do it using >>

      Comment


      • #4
        Through -a, you can see those things up real quick with the man command. Which now would be man tee

        Comment

        Working...
        X