Useful GNU/Linux commands

To find groups that a user belong

               ~$ id -nG

        Output

group1 group2 group3

To remove user from a particular group

Ex :- To remove above user from group1

              ~$ usermod -G group2,group3

To unlock dpkg

~$ sudo fuser -vki /var/lib/dpkg/lock

~$ sudo dpkg –configure -a


Connect to Amazon EC2 instance via terminal

              ~$ ssh -i username@public-dns



Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s