check hard disk rpm or rotation speed

Lot of times you want to check the disk rpm, especially on the servers to check if it is 7.2K or 10K or 15K rpm disk. How do you do this from linux terminal. Here it is :

 

sginfo -g /dev/<device>

Note that sginfo comes from sg3-utils.

ssh trick – ssh to remote host with bastion host

Lot of times, you have to ssh to a server with bastion host. If you dont know what is bastion host then see this:

bastion host

 

Now, in such cases, either you add an entry in “~/.ssh/config” to route the ssh through the bastion host or do ssh to bastion host and then ssh from there to the actual host. But wait, there is always a better way:

 

ssh -t <bastion host> ssh -t <actual host>

You can use the usernames as required for the 2 hosts and then you will have to enter passwords, first for the bastion host and then the actual host.

BTW, you can use tunneling options as well with the above command.

Check your session type – wayland or X11

With both wayland and X11 in mainstream, its pretty easy to forget if you are running in Wayland or in X11. To check this here are the commands:

loginctl list-sessions
# The above command will show you all the sessions. Note the session number for your session

loginctl show-session <session number> -p Type