0

I do follow turorial at https://serverfault.com/questions/550276/how-to-block-internet-access-to-certain-programs-on-linux. But when i create file in step 2: nano /home/username/.local/bin/no-internet, it warning: no such file or dir. I tried to it with touch command but it still error: no such file or dir. what happen? Can you guide me to fix it?

1 Answer 1

1

When people document install procedures, they often want a way to refer to the installing user's HOME directory. In this case, he/she used /home/username/..., when $HOME/.local/bin/no-internet or ~/.local/bin/no-internet would have been clearer.

Replace username with YOUR username (it is stored in the environment variable USER), and

nano /home/$USER/.local/bin/no-internet

or use the HOME environment variable to refer to your home directory ( this is better than using /home/$USER, since user home directories are not required to be in /home.

nano $HOME/.local/bin/no-internet

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .