Nice little program to print a nice ascii artwork and a message in your terminal.

The Cowsay program is very useful for printing information in your terminal. There are quite a few cow files allowing many useful avatars to print in your terminal. Install this today. jason@Yog-Sothoth » ~ » $ sudo apt install cowsay Then run this command to list all the available *.cow files. jason@Yog-Sothoth » ~ » … Read more

Another way to get IP address information from the Netstat command.

Get IP address information using Netstat on Linux How to get IP address information using netcat and some other useful tips. user1@cloudshell:~$ netstat | awk ‘/tcp6/ { print $5 }’ 74.125.41.158:36146 173.194.93.92:48039user1@cloudshell:~$ netstat | awk ‘/tcp6/ { print $5 }’ 74.125.41.158:36146 173.194.93.92:48039 user1@cloudshell:~$ netstat | awk ‘/tcp6/ { print $5" – "$6,$4 }’ 74.125.41.158:36146 – … Read more

How to best get IP address information with Powershell on Windows 11.

This example will get the current IP address(s) of the user`s machine. PS C:\Users\Intel i5> Get-NetIPAddress | Sort-Object -Property InterfaceIndex | where-object -FilterScript {$_.SuffixOrigin -eq "Dhcp"}     IPAddress : 192.168.1.114 InterfaceIndex : 10 InterfaceAlias : Ethernet AddressFamily : IPv4 Type : Unicast PrefixLength : 24 PrefixOrigin : Dhcp SuffixOrigin : Dhcp AddressState : Preferred … Read more

How to print your IP address with Bash on Mac OSX in the terminal app.

This one-liner will print the current LAN IP address of a machine running Macintosh OSX. jason@. PWD: ~. -bash. 3.2.57. 10 $> ifconfig | grep "inet " | awk ‘FNR==2{print $2}’ 192.168.1.2jason@. PWD: ~. -bash. 3.2.57. 10 $> ifconfig | grep "inet " | awk ‘FNR==2{print $2}’ 192.168.1.2 This is 10.14.2 (18C54), but this command … Read more

Interesting and useful commands available using the BASH shell on Linux.

This is an interesting command to view your command history when you are using Bash. ┌──[[email protected]]─[~] └──╼ ╼ $ hash hits command 1 /usr/bin/gethostip 1 /usr/bin/sudo┌──[[email protected]]─[~] └──╼ ╼ $ hash hits command 1 /usr/bin/gethostip 1 /usr/bin/sudo This command is a Bash shell built-in command. If you are using the tcsh or zsh shells; this command … Read more

Getting IP address information in Powershell 5.1.

Getting information about your IP address is easy in Powershell. Below is a simple example, this is printing information about the IP addresses on the system. PS C:\Users\Jim\Pictures\Saved Pictures> Get-NetIPAddress |Select-Object IPAddress   IPAddress ——— fec0::6155:1c09:8069:d506%1 fe80::6155:1c09:8069:d506%7 ::1 10.0.2.15 127.0.0.1PS C:\Users\Jim\Pictures\Saved Pictures> Get-NetIPAddress |Select-Object IPAddress IPAddress ——— fec0::6155:1c09:8069:d506%1 fe80::6155:1c09:8069:d506%7 ::1 10.0.2.15 127.0.0.1 This is a … Read more

Convert your IP address to binary easily with this command.

This one-liner will take your IP address and convert it into binary. This is very useful and fun to do. ┌──[[email protected]]─[~/Videos] └──╼ ╼ $ ipcalc `ip a | awk ‘/inet / { print $2 }’ | sed -n 2p | cut -d "/" -f1` | awk ‘/Address/ {print $3,$4}’ 11000000.10101000.00000001. 00000010┌──[[email protected]]─[~/Videos] └──╼ ╼ $ ipcalc … Read more

How to get the gateway IP address of your machine on Linux.

Getting the gateway IP address of your machine is a very important trick sometimes. This is very easy on Linux. Use the ip route command on Linux to print information about the IP routing. This includes the gateway IP address. ┌──[[email protected]]─[~/Videos] └──╼ ╼ $ ip route | grep default | awk ‘{print $3}’ 192.168.1.1┌──[[email protected]]─[~/Videos] └──╼ … Read more

Some more very useful Linux tips for scripting fans.

How to get the total size of a folder using Linux scripting. ┌──[[email protected]]─[~/Documents] └──╼ ╼ $ du -ack -BM | sort -nr | head -n 1 | awk ‘{print $1}’ 30255M┌──[[email protected]]─[~/Documents] └──╼ ╼ $ du -ack -BM | sort -nr | head -n 1 | awk ‘{print $1}’ 30255M This shows the total size of … Read more

Another very useful way to get your public IP address from the Internet with the command line.

This useful one-liner will get your IP address from the command line very easily. This uses Google services and works very well. 4.4 Tue Jun 30 jason@Yog-Sothoth 0: $ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | sed -e ‘s/^"//’ -e ‘s/"$//’ 209.134.104.2004.4 Tue Jun 30 jason@Yog-Sothoth 0: $ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | sed -e … Read more

Another way to get information about your network interfaces on Linux.

There are many ways to get networking information on your Linux computer. This is how to return the active network interface(s) on your Linux system. 4.4 Mon Jun 22 jason@Yog-Sothoth 0: $ ip addr | awk '/state UP/ {print $2}' | sed 's/.$//' enp0s25 Combining this command with another using backticks, it is possible to … Read more

How to get the IP address of your computer with Powershell.

This is how to get the current IP address of the active network adapter in your Windows system. PS C:\Users\Doom> (Test-Connection -ComputerName (hostname) -Count 1).IPV4Address.IPAddressToString 192.168.1.2PS C:\Users\Doom> (Test-Connection -ComputerName (hostname) -Count 1).IPV4Address.IPAddressToString 192.168.1.2 This prints the IP address of your machine to the Powershell terminal. This is a great way to get just the IP … Read more