1

When I try to move my files into /opt with the command mv, bash says that I don't have permission.

Zanna
  • 72,312

1 Answers1

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
  • 122,292
  • 133
  • 301
  • 332