Why not just use sudo to run lsof?

sudo lsof |grep openvpn

If you are looking for listening ports, then:
sudo lsof -i |grep openvpn



On Tue, Mar 17, 2015 at 11:39 AM, Joe S <joes...@shaw.ca> wrote:

> I am wondering if someone can tell me the right way to get a root shell
> through sudo. I tried the following commands:
> sudo su -
> sudo -i
>
> Then tried the following command and got this warning:
>
> lsof|grep openvpn
> lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file
> system /home/joe/.gvfs Output information may be incomplete.
>
> It looks like Linux is looking in the wrong directory for info. I have
> read that the correct way to do this was sudo su -
> This would use root's environment and home directory.
>
> Looking on the Net is confusing as I get conflicting advice between
> this.
>
> Thanks
>
> _______________________________________________
> clug-talk mailing list
> clug-talk@clug.ca
> http://clug.ca/mailman/listinfo/clug-talk_clug.ca
> Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
> **Please remove these lines when replying
>
_______________________________________________
clug-talk mailing list
clug-talk@clug.ca
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to