Home > How Can I Copy A File To My Usr/Bin Folder In Linux?
Question

How can I copy a file to my usr/bin folder in Linux?

Answers
05/24/2022
Alleris

You are probably new to Linux and you have tried to copy a file, using a file explorer, in the /usr/bin directory (Don't make Ernesto angry with the absolute paths because you see how he gets) and it didn't let you or you got a warning that you don't have permission to perform this action. If this is the case you should do the following, open a terminal (pressing CTRL+ALT+T in most cases), and type the following

sudo cp /path/from/file/origin/file /usr/bin

It will ask you to enter your password as you are prefixing sudo, which means that you are performing this action as a superuser. Be careful with the use of sudo, you should only use it when really necessary, look up file permissions on linux and using sudo for more information.

If you don't know what the path to your file is you can find out by looking at the file properties in your file explorer or with the detail view.

To give you an example if the file is in your documents folder it should be something like /home/yourUser/Documents/yourFile

Reply
I can't log in to Kali Linux after installing it, how can I log in? :: How can I restore an SD card to its original 16Gb capacity (now 2Gb) after it was used for a bad Linux Boot?
Useful Links