LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to add an entry to a file? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-add-an-entry-to-a-file-4175574773/)

novaglider 03-13-2016 03:37 PM

How to add an entry to a file?
 
I am new to linux and while installing Docker https://docs.docker.com/engine/insta...x/ubuntulinux/ I got stuck at step 7.

So I am trying to add deb https://apt.dockerproject.org/repo ubuntu-wily main to the docker.list file I created yet nothing seems to work the way it should.

I tried this: http://www.cyberciti.biz/faq/unix-li...ext-to-a-file/
and this: http://unix.stackexchange.com/questi...-the-last-line
and several more yet the closest I get is:

Code:

mitja@mitja-N73SV:/etc/apt/sources.list.d$ sudo echo 'deb https://apt.dockerproject.org/repo ubuntu-wily main' >>docker.list
bash: docker.list: Permission denied


BW-userx 03-13-2016 04:15 PM

are you trying to add an entry to a file?


Quote:

Open the file in your favorite editor.


$ sudo geany <or your favorite editor> /etc/apt/sources.list.d/docker.list
If the file doesn’t exist, create it.

Remove any existing entries.

Add an entry for your Ubuntu operating system.
Quote:

as you see here you have NO editor with root privileges
right here
Code:

mitja@mitja-N73SV:/etc/apt/sources.list.d$ sudo echo 'deb https://apt.dockerproject.org/repo ubuntu-wily main' >>docker.list
bash: docker.list: Permission denied




All times are GMT -5. The time now is 08:31 PM.