Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm still a little new to Ubuntu and was wondering how I can copy files, in this case Aptana Studio, to /usr/local/ without being denied.

Is there a way to do it in terminal? Or a way to allow myself permission? I should add that I am using 10.10 Desktop edition, not server.

share|improve this question
Why do you want that? You're most likely looking for /opt or you want to install it in your home directory. /usr is managed by apt, so what ever you copy in there can change without notification or break your system. – Bobby Feb 5 '11 at 19:41
@Bobby the Aptana installation instructions for linux advise to install it in /usr/local but I do agree with you /opt is the more "sensible place" to put it which is why I have it there especially if they get a ppa at launchpad could cause problems down the road. – Allan Feb 5 '11 at 19:53
So, it is better to place it on /opt? – Keith Groben Feb 5 '11 at 22:34
Yes opt is classed as the place to put non package programs as the opt directory is not touched by the system so no automatic upgrades or removals you have to everything manually. BTW if you use XAMPP which I do (to lazy to install a proper lampp stack) this is where you would put it. – Allan Feb 6 '11 at 8:19
up vote 13 down vote accepted

There are a couple of different ways

  1. Open Nautilus as sudo by typing gksudo nautilus in terminal then copy the files as you would normally one warning I would close nautilus straight after so you don't accidently use it for moving normal files.

  2. Open terminal and type sudo cp file1 /usr/local/ obviously replacing file1 with aptana

  3. Add open as admin option to nautilus and open the local folder by right clicking and selecting open as administrator.

btw. Aptana is the best web IDE I ever used and I hope it stays that way....

share|improve this answer
Thanks for the advise. I think it is too. I just am having a tough time getting it installed. – Keith Groben Feb 5 '11 at 22:33

/usr/local is a direcotry of user root, so you need to use sudo to achieve your end:

sudo mkdir /usr/local/mydir
sudo cp file.txt /usr/local/mydir

for example.

share|improve this answer
You can also type sudo -s, which makes every command thereafter "sudo" until you exit, either with exit or CTRL-D. – Scaine Feb 5 '11 at 19:40
@Scaine: sudo su does the same(just FYI). – John Feb 5 '11 at 21:27
Not quite, John. sudo su will give you a root shell as root. sudo -s will give you a root shell as /you/. Try both and do an echo $HOME to see the difference. sudo su is the equivalent to sudo -i. – Scaine Feb 6 '11 at 9:51

I think the easiest way is to type in Terminal sudo su-> your password, finaly sudo cp /dir/file /usr/local/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.