Joel's dev blog

Misc useful operations on (kali) linux

October 05, 2017

1 min read

How to capture screen

The entire screen

Prt Sc 

Partial screen

shift + Prt sc

Create a symlink

ln -s /path/to/file /path/to/symlink

Create/update a symlink

ln -sf /path/to/file /path/to/symlink

Using curl to get external ip address and my geolocation

Getting an external ip address

curl ifconfig.me [or icanhazip.com or ipecho.net or ipinfo.io/ip]

Getting my geolocation

It will provide you with the data in JSON format.

$ curl ipinfo.io/[your ip]
{
  "ip": ...
  "hostname": ...
  "city": ...
  "region": ...
  "country": ...
  "loc": "coordinateX", "coordinatey",
  "org": "organization name"
  "postal": ...
}

alternatively:

$ curl freegeoip.net/xml/[your ip]
...
data shown in xml format
...

Written by Joel Mun. Joel likes Rust, GoLang, Typescript, Wasm and more. He also loves to enlarge the boundaries of his knowledge, mainly by reading books and watching lectures on Youtube. Guitar and piano are necessities at his home.

© Joel Mun 2024