Commands to identify nvme disks

lspci |grep -i ssd
lsblk |egrep “NAME|nvme”
dmesg|grep -i nvme
grep nvme /proc/modules
lsmod | grep nvme
sudo nvme list /dev/nvme0n1
sudo isdct show -a -intelssd 0

Advertisements

Close an unresponsive ssh session with ~.

SSH escape sequences:

~. – terminate connection (and any multiplexed sessions)
~B – send a BREAK to the remote system
~C – open a command line
~R – Request rekey (SSH protocol 2 only)
~^Z – suspend ssh
~# – list forwarded connections
~& – background ssh (when waiting for connections to terminate)
~? – this message
~~ – send the escape character by typing it twice

Via https://lonesysadmin.net/2011/11/08/ssh-escape-sequences-aka-kill-dead-ssh-sessions/amp/

How to do a ping scan or ping sweep with nmap

From the man page:

-sn (No port scan)
Systems administrators often find this option valuable as well. It can easily be used to count available machines on a network or monitor server availability.

Examples:

Scan an entire subnet
nmap -sn 192.168.1.0/24

Scan a range of IP addresses
nmap -sn 192.168.1.1-10

$ nmap -sn 192.168.1.1-5

Starting Nmap 7.31 ( https://nmap.org ) at 2017-08-03 18:55 IST
Nmap scan report for 192.168.1.1
Host is up (0.0067s latency).
Nmap scan report for 192.168.1.2
Host is up (0.0069s latency).
Nmap scan report for 192.168.1.3
Host is up (0.0065s latency).
Nmap done: 5 IP addresses (3 hosts up) scanned in 1.23 seconds

You can also use -sP. It was known as -sP in older releases of nmap