When I try to move my files into /opt
with the command mv
, bash says that I don't have permission.
Asked
Active
Viewed 8,766 times
1

Zanna
- 70,465

HilalHussain
- 19
-
3Please add more information. Which user account are you using, and are you using sudo. – thomasrutter May 09 '17 at 00:47
-
I'd suggest that manually moving arbitrary files into /opt is probably the wrong thing to do. If you've got executable files, you should put them in ~/bin (in your home folder). Non-executable files belong elsewhere. – heynnema May 09 '17 at 14:23
1 Answers
6
To move a file called filename into the /opt
directory change directories using cd
into the directory containing filename and run this command:
sudo mv filename /opt # preface mv with sudo to move a file into a directory that is owned only by root

karel
- 114,770
-
I'm suggesting to the user that they not manually move arbitrary files into /opt, but rather put executable files into ~/bin, and non-executables elsewhere. – heynnema May 09 '17 at 14:25