Some more useful Linux commands that are very useful indeed.

Posted: August 4, 2012. At: 2:57 PM. This was 5 years ago. Post ID: 4371
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

Using the Linux last command to view re-boot history.

C:\HOME\FLYNN\DOCUMENTS> last reboot
reboot   system boot  3.4.0-rc2-bejiit Sat Aug  4 12:50 - 14:29  (01:39)
reboot   system boot  3.4.0-rc2-bejiit Fri Aug  3 21:11 - 21:16  (00:05)
reboot   system boot  3.4.0-rc2-bejiit Fri Aug  3 20:21 - 20:57  (00:36)
reboot   system boot  3.4.0-rc2-bejiit Fri Aug  3 11:35 - 20:00  (08:24)
reboot   system boot  3.5.0-rc4-custom Fri Aug  3 11:25 - 11:34  (00:08)
 
wtmp begins Wed Aug  1 17:29:31 2012

To view all failed login attempts, the lastb command will suffice.

C:\HOME\FLYNN\DOCUMENTS> sudo lastb
UNKNOWN  tty2                          Wed Aug  1 22:31 - 22:31  (00:00)
 
btmp begins Wed Aug  1 22:31:03 2012

To lookup a unit conversion easily, the units command is the one stop shop for converting and looking up the value of a specific unit of measurement.

C:\HOME\FLYNN\DOCUMENTS> units -t '1 hogshead'
0.23848094 m^3
 
C:\HOME\FLYNN\DOCUMENTS> units -t '1 parsec'
3.0856776e+16 m

If you travelled 800 meters in 9.58 seconds how fast are you going now?

C:\HOME\FLYNN\DOCUMENTS> units -t '800m/9.58s' 'miles/hour'
186.80053

This command displays the DNS information about a particular host.

C:\HOME\FLYNN\DOCUMENTS> host google.com
google.com has address 74.125.237.130
google.com has address 74.125.237.131
google.com has address 74.125.237.132
google.com has address 74.125.237.133
google.com has address 74.125.237.134
google.com has address 74.125.237.135
google.com has address 74.125.237.136
google.com has address 74.125.237.137
google.com has address 74.125.237.142
google.com has address 74.125.237.128
google.com has address 74.125.237.129
google.com has IPv6 address 2404:6800:4006:804::1003
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.

To list the IP addresses for your network interfaces, use the ip command.

C:\HOME\FLYNN\DOCUMENTS> ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 6c:f0:49:b5:e6:2a brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.4/24 brd 192.168.1.255 scope global eth0
    inet6 fe80::6ef0:49ff:feb5:e62a/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:13:46:3a:02:83 brd ff:ff:ff:ff:ff:ff

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

Leave a Reply