The touch command creates the file. The included with thee sudo command before it should have been more than enough. If it isn’t I think you have bigger problems. Try again, make sure to not forget sudo and post any and all errors, exactly, not paraphrased. a Photo if nothing else.
(btw, cant i create a file with a different name, like does the name matter here because when i used the same command with resolv1.conf as name then there was no error
Usually, when a command which creates a file says there’s no such file or directory, it’s because the directory doesn’t exist.
However in this case it seems it’s because resolv.conf is a broken symlink.
# check if the target exists
ls /run/systemd/resolve/stub-resolve.conf
# backup or remove the symlink
sudo mv /etc/resolv.conf /etc/resolv.conf.symlink.bak
# create a new resolv.conf
echo "nameserver 1.1.1.1" | sudo tee /etc/resolv.conf
# test the internet, you may need to disable/re-enable
# the network connection
# or restart NetworkManager
sudo systemctl deamon-reload
sudo systemctl restart NetworkManager
On my system, resolv.conf is a regular file owned by the filesystem package. So probably best to reinstall it.
im really sorry, but as i posted above, i cant really use internet on my pc so there is no way to copy and post it so i have to use my phone as the last option