Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
1  
@Bobby the Aptana installation instructions for linux advise to install it in /usr/local docs.aptana.com/docs/index.php/Installing_Aptana_on_Linux 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
add comment

2 Answers 2

up vote 9 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
add comment

/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
1  
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
1  
@Scaine: sudo su does the same(just FYI). –  John Feb 5 '11 at 21:27
2  
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
add comment

Your Answer

 
discard

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.