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

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

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

How to view network traffic to find a certain person that is hogging bandwidth.

To view network traffic and then locate certain traffic that is hogging bandwidth, use the iftop utility. This is a great way to see what is going on in your network. Just install iftop. jason@Yog-Sothoth » ~ » $ sudo apt install iftop Then run it with this one-liner. jason@Yog-Sothoth » ~ » $ sudo … Read more

Another way to get the actual IP address of your machine.

This is yet another way to get the actual IP address of your Linux machine on a LAN. This returns just the IP address of your Linux computer. jason@jason-Lenovo-H50-55:~$ ip a | awk ‘/inet / { print $2 }’ | sed -n 2p 192.168.1.4/24jason@jason-Lenovo-H50-55:~$ ip a | awk ‘/inet / { print $2 }’ | … Read more

How to get just the IP address of your Linux machine using curl.

To get just the IP address of your Internet facing Linux machine, use this command. jason@jason-desktop:~/Documents/ipinfo/src$ curl icanhazip.comjason@jason-desktop:~/Documents/ipinfo/src$ curl icanhazip.com This will return just your IP address. This is another way to get this information. jason@jason-desktop:~/Documents$ curl ipinfo.io/ipjason@jason-desktop:~/Documents$ curl ipinfo.io/ip To get information about a DNS server, use the dig command. jason@jason-desktop:~/Documents/ipinfo/src$ dig 8.8.8.8   … Read more

More commands to get information about your network adapter.

There are a few commands available in Red Hat Linux to get information about your network adapter. Here are a couple. The ifstat command returns information about the network throughput of your adapter. [jason@darknet ~]$ ifstat #kernel Interface RX Pkts/Rate TX Pkts/Rate RX Data/Rate TX Data/Rate RX Errs/Drop TX Errs/Drop RX Over/Rate TX Coll/Rate lo … Read more

How to set a MAC address on a Cisco 3700 router.

This command in interface configuration mode will change the MAC address for a specific interface on the router. R1(config-if)#mac-address DE.AD.BER1(config-if)#mac-address DE.AD.BE And this is what I get when I use the show run command and view the properties of the interface. interface FastEthernet0/0 mac-address 00de.00ad.00be ip address 192.168.0.1 255.255.255.0 ip nat inside ip nat enable … Read more