The command you originally gave: bash ./amd-driver-installer-12-3-x86.x86_64.run
would have worked had the file amd-driver-installer-12-3-x86.x86_64.run been in the directory you were in when you issued the command.
When you did "su -
", and entered roots password, your working directory changed to /root.
If you use just "su
" without the hyphen, then you would have remained in the directory (folder) that you were in.
The "./" in front of the filename tells bash to look for the file right here in this directory. Otherwise, bash will only look in the directories defined in the $PATH environment variable. If a file is not in your current working directory (you can see which that is by giving the pwd
command), then you can just specify the full directory path to the file.
So, if your current working directory was "/root", and the file was in /home/Abendstern/Downloads/amd-driver-installer-12-3-x86.x86_64.run, then you would use the command:
You can use the command "bash" and "sh" interchangeably. The "sh" command is just a symbolic link that points to "bash" command.