Some miscellaneous Linux commands.

Posted: November 12, 2014. At: 11:34 AM. This was 3 years ago. Post ID: 7901
Page permalink: http://securitronlinux.com/bejiitaswrath/some-miscellaneous-linux-commands/

Now, we must convince Congress to stop the FCC. Can you display an alert?

To reboot your Linux machine, use the sudo reboot command. Another way is to type sudo shutdown -r now.

Linus Torvalds loves Debian.
Linus Torvalds loves Debian.

To lookup the IP address of a host, use the nslookup command. For example: nslookup google.com.

ubuntu@ip-172-31-20-234 ~ % nslookup google.com
Server:         172.31.0.2
Address:        172.31.0.2#53
 
Non-authoritative answer:
Name:   google.com
Address: 74.125.237.193
Name:   google.com
Address: 74.125.237.194
Name:   google.com
Address: 74.125.237.195
Name:   google.com
Address: 74.125.237.196
Name:   google.com
Address: 74.125.237.197
Name:   google.com
Address: 74.125.237.198
Name:   google.com
Address: 74.125.237.199
Name:   google.com
Address: 74.125.237.200
Name:   google.com
Address: 74.125.237.201
Name:   google.com
Address: 74.125.237.206
Name:   google.com
Address: 74.125.237.192

To add a user to a group, use the useradd command. For example, this command will add the user homer to the technicians group.

sudo useradd -G technicians homer

To lock a user account and stop them logging in, use the passwd -l command.

sudo passwd -l homer

The example above will lock the user account homer.

The sudo passwd command may be used to change a users password. For example, the below command will change a password for the user homer.

sudo passwd homer

Then type a new password for the user account.

No comments have been made. Use this form to start the conversation :)

Leave a Reply