Add,List,Delete user in sudoers listing

Add
sudo usermod -a -G sudo username

List
getent group sudo

Delete
sudo deluser username sudo

 

How to open any file in the default GUI text editor in Ubuntu.

xdg-open /filepath/file.txt
OR
gedit /filepath/file.txt


Open with root user
sudo xdg-open /filepath/file.txt
OR
sudo gedit /filepath/file.txt

 

Change apache2 default document root "/var/www" 

sudo gedit /etc/apache2/sites-available/default

 

Restart apache server

sudo service apache2 restart

 

  • linux-command