I tried making a file in a root directory, but even when using Sudo, it says I don't have permission.
Making the directory and file:
$ sudo mkdir /VM
$ sudo touch /VM/hi
$
Trying to echo to file:
$ echo "hi" > /VM/hi
warning: An error occurred while redirecting file '/VM/hi'
open: Permission denied
$ sudo echo "hi" > /VM/hi
warning: An error occurred while redirecting file '/VM/hi'
open: Permission denied
$
Should I change the file and directory's permissions? If so, what would the command for that be?