This adds the line to your sources.list
Code:
echo "deb http://deb.torproject.org/torproject.org maverick main" | sudo tee -a /etc/apt/sources.list
echo basically prints the line you need, "deb
http://deb.torproject.org/torproject.org maverick main", then that is piped (the |) to the
tee command, which writes it to the file. The -a flag is to append the line, rather than overwrite the file. (The quotation marks will not appear in your sources.list when doing this either.)
If you were root, you could dispense with piping the output to tee and just do
Code:
echo "deb http://deb.torproject.org/torproject.org maverick main" >> /etc/apt/sources.list
(Again the quotation marks won't appear in the file.)
But this does not work because the elevated privileges with sudo are only happening to the "echo" command and not the part you need, which is writing to the file.
Code:
sudo echo "deb http://deb.torproject.org/torproject.org maverick main" >> /etc/apt/sources.list
It's never a bad idea to make backups.