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 am pretty new to Ubuntu 12.04. I have a problem using my datacard on it, so I got a program called Sakis 3G. This program is a file after downloading; it opens in gedit. I need to copy this file to the bin folder in File System. But, it shows a permission error. Can anybody help me out? How to copy this using Terminal with the full command? The file is in Downloads folder and I need to copy it to bin folder in File System without errors.

share|improve this question
4  
While sometimes it is correct to manually copy files into /bin, usually you should not do this. Can you provide more information about what you're trying to do? Are there instructions online that you're attempting to follow? I recommend editing your question to provide more information. –  Eliah Kagan Jul 21 '12 at 5:42

2 Answers 2

Here you go:

sudo cp Downloads/"sakis 3G" /bin/

PS: Are you sure the name has a space in it?

share|improve this answer

My guess is that you just want to be able to execute your executable for the shell, without giving the full path to the executable.

The PATH environment variable holds the directories that are searched when executing an arbitrary command in a shell. Just type echo $PATH in a shell and you will see the searched directories, separated by a :.

The thing now is that it is generally a bad idea to put your own links or executables into the /bin folder, you would rather put them into the /usr/local/bin folder (which is usually empty unless you put something in there), as this folder is use used for exactly that purpose. See the FHS for more information about placing files under linux.

@mikewhatever already answered the permission problem.

This program is a file after downloading; it opens in gedit.

What's the file type you want to open? Give some more details please. Do you see text that makes sense? Or just garbage in gedit? You probably have to set the executable bit for the file chmod +x <file-name> to make it work properly.

That being said, you have to be careful when manually creating files in the file-system (not speaking about your home folder), as nearly all files are managed by a package management system. If possible, i would search for a solution to install your software as a package.

share|improve this answer

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.