Title: Can't install Spotify for Ubuntu 12.10
Tags: installation;command-line;apt;package-management
Question: As the title says, I can't install spotify. I've googled for answers but nothing was relevant to the case. Another problem is that I can't install wine (so I have to install Spotify through Terminal).
I've followed the instructions at spotifys web.
But when I run /etc/apt/sources.list
deb http://repository.spotify.com stable non-free
I got this:
chucknorris@ubuntu:~$ /etc/apt/sources.list
bash: /etc/apt/sources.list: Permission denied
chucknorris@ubuntu:~$ deb http://repository.spotify.com stable non-free
No command 'deb' found, did you mean:
Command 'debc' from package 'devscripts' (main)
Command 'derb' from package 'libicu-dev' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'debi' from package 'devscripts' (main)
Command 'xdeb' from package 'xdeb' (universe)
Command 'dwb' from package 'dwb' (universe)
deb: command not found
chucknorris@ubuntu:~$
So what should I do?
PS. I have reinstalled Ubuntu a couple of times because of problems and the first Ubuntu (also 12.10) I was able to install it.

Here is the accepted answer: You need root privileges to modify the /etc/sources.list
Try this:
sudo chmod o+w /etc/apt/sources.list
sudo echo "deb http://repository.spotify.com stable non-free" &gt;&gt; /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59
sudo apt-get update
sudo apt-get install -y spotify-client
Comment for this answer: Thanx, that helped! :)

Here is another answer: thats not the way how to add a source.
open your terminal and then follow the steps one by one.
sudo gedit /etc/apt/sources.list
then it will open a text file and in that file place the following line at the last
deb http://repository.spotify.com stable non-free
then save &amp; close the file.
now do as
sudo apt-get update
sudo apt-get install spotify
Comment for this answer: You've to add key first, before install.
Comment for this answer: So the correct way to add a repository is via sudo gedit /etc/apt/sources.list? I think I tried it but it didn't work. I will try it next time, thx :)
Comment for this answer: @OrangeTux Ok thanks.so you want me to place key in my answer too or deleting my answer ?

Here is another answer: I believe that they easy way to install spotify in ubuntu is to next method:
Open a terminal and paste
sudo add-apt-repository "deb http://repository.spotify.com stable non-free"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59
sudo apt-get update
sudo apt-get install spotify-client
at least I did it that way, and still working

{'source': 'StackExchangeDataset', 'subset': 'askubuntu.com', 'metadata': {'AnswerCount': 3, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2013:00:02/17/13', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<installation><command-line><apt><package-management>', 'Title': "Can't install Spotify for Ubuntu 12.10", 'ViewCount': 2477, 'id': 257306, 'user_AboutMe': '', 'user_AccountId': 2341110.0, 'user_DisplayName': 'Storfiskarn52', 'user_Reputation': 33.0, 'user_Views': 4.0, 'user_id': 129357.0}}