Linux Mint security breach cause for much discussion.

The recent security breach on the Linux Mint website shows that updating a WordPress website regularly is very important. This breach allowed malicious attackers to compromise the Mint website and change download links to point to Linux Mint ISO images that contained extra files. Therefore, the people using these ISO`s would have been using a … Read more

Retrieve information about your wireless interface on Ubuntu with the command line.

The /proc/net/wireless file contains information about your wireless connection. jason@darknet:~$ cat /proc/net/wireless Inter-| sta-| Quality | Discarded packets | Missed | WE face | tus | link level noise | nwid crypt frag retry misc | beacon | 22 wlan0: 0000 58. -52. -256 0 0 0 1 47 0jason@darknet:~$ cat /proc/net/wireless Inter-| sta-| Quality … Read more

Different ways to get user and system information on Linux.

The who command on Linux and UNIX systems will list all currently logged in users on your system. jason@darknet:~$ who -Htu NAME LINE TIME IDLE PID COMMENT jason :0 2016-02-13 13:43 ? 1895 (:0) jason tty2 2016-02-13 13:43 00:01 2164 jason pts/0 2016-02-13 13:43 . 2178 (:0.0)jason@darknet:~$ who -Htu NAME LINE TIME IDLE PID COMMENT … Read more

How to create an ISO image of a directory with the command line.

Creating an ISO image of a directory is useful sometimes. This command will create an ISO image of a directory, ready to burn to a CD or DVD. jason@darknet:~$ genisoimage -l -V hi -r ~/Downloads/stuff > cdrom.isojason@darknet:~$ genisoimage -l -V hi -r ~/Downloads/stuff > cdrom.iso Here is example usage, creating an ISO of a directory … Read more

How to find out the gateway IP address of your Linux machine on a LAN.

This is how you find out the gateway IP address of your Linux machine on a LAN. I have executed the route -n command and I have this output. The UG flags on the IP address denote it as a gateway IP address. root@darknet:~# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric … Read more

Using the Linux stat command to get information about a file.

The Linux stat command allows information to be shown about a file on your file-system. jason@darknet:~/Documents$ stat /bin/ls File: ‘/bin/ls’ Size: 118280 Blocks: 232 IO Block: 4096 regular file Device: 801h/2049d Inode: 10616940 Links: 1 Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2016-02-01 08:55:40.145487505 +1100 Modify: 2015-03-15 02:47:04.000000000 +1100 Change: 2016-01-19 … Read more

Get SSL information from a website using sslscan.

The sslscan command for the Kali Linux penetration testing distribution is very useful for gaining an insight into the SSL configuration of a web site. Here is example usage on healthcare.gov… root@darknet:~# sslscan healthcare.gov Version: 1.10.5-static OpenSSL 1.0.2e-dev xx XXX xxxx   Testing SSL server healthcare.gov on port 443   TLS renegotiation: Secure session renegotiation … Read more

How to use the ip command to bring down an interface on RHEL.

The ip command is a useful alternative to the ifconfig command and allows the user to manage network interfaces. This is a good way to use the command line to bring network interfaces up or down. In this example I am bringing the network interface down. [root@localhost jason]# ip link set eno16777736 down [root@localhost jason]# … Read more

Get the startup time of your Linux machine with systemd.

The systemd-analyze command will print the time taken for the system to boot up. This separates the time for the kernel and the userspace environment. root@darkstar:~# systemd-analyze Startup finished in 4.728s (kernel) + 28.339s (userspace) = 33.068sroot@darkstar:~# systemd-analyze Startup finished in 4.728s (kernel) + 28.339s (userspace) = 33.068s This command will get the date and … Read more

Download a Youtube video to mp3 with the Linux shell.

Firstly, install youtube-dl. jason@darkstar:~/Music$ sudo apt-get install youtube-dljason@darkstar:~/Music$ sudo apt-get install youtube-dl Then run this command with the Youtube video URL. jason@darkstar:~/Music$ youtube-dl -f bestaudio -x –audio-format mp3 –prefer-ffmpeg https://www.youtube.com/watch?v=UWFm2LIYNjg [youtube] UWFm2LIYNjg: Downloading webpage [youtube] UWFm2LIYNjg: Extracting video information [youtube] UWFm2LIYNjg: Downloading DASH manifest [download] Destination: Dune (1983) OST – Dune Prophecy (Long Version)-UWFm2LIYNjg.m4a [download] … Read more

Misc commands to get system information from a Linux box.

List all network interfaces on your Linux machine that are up. [jason@localhost ~]$ ip addr | grep UP 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000 3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN[jason@localhost ~]$ ip addr | grep UP 1: lo: … Read more

Very useful and informative Linux commands.

While running Linux, if you want to list the contents of a folder in a vertical list format, just use the ls command with these switches. jason@ubuntu:~$ ls -luh –color=yes total 48K drwxr-xr-x 2 jason jason 4.0K Dec 15 03:03 Desktop drwxr-xr-x 2 jason jason 4.0K Nov 29 17:00 Documents drwxr-xr-x 2 jason jason 4.0K … Read more

Some more obscure Linux commands that are very useful.

The logsave command will print the output of a command to a file. This will also add a timestamp to the logfile telling the system administrator when the command was run. logsave /var/log/partsize df –hlogsave /var/log/partsize df –h This is an example, the output of the command is also printed to STDOUT. jason@ubuntu:~$ logsave partsize … Read more

How to generate a random password using the command line.

The shuf command for Linux allows a command-line user to select a given number of random words from a wordlist. [jason@localhost ~]$ shuf -n 8 /usr/share/dict/words amphivasal thoracically U. bluet Dabih thioamid taxiing convictism[jason@localhost ~]$ shuf -n 8 /usr/share/dict/words amphivasal thoracically U. bluet Dabih thioamid taxiing convictism This can be used to generate a word … Read more