Useful command – Linux

0
2351
linux
linux

Useful command – Linux

 

1) Add the user to the sudo group:

sudo adduser <username> sudo

P.S. The change will take effect the next time the user logs in.
This works because /etc/sudoers is pre-configured to grant permissions to all members of this group (You should not have to make any changes to this):

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

2) View a file
cat
tail
head
pg

3) Open, create, and edit a file
pico
vi
ued
ed
vim ( i will not use it 🙂 )