Useful BASH shell tips for Ubuntu and Debian alike.

The BASH shell has many useful features that allow you to perform your tasks very easily. If you are running a program in a terminal and you wish to run another command whilst the first command is running, then press CTRL-Z to move the running process to the background. Then…

Read More

Find the distance of a light-year and other units with the Linux command line.

This command will show how many kilometers there are in a light year. jason$ units -t ‘1 light year/kilometers’ 9.4605284e+12jason$ units -t ‘1 light year/kilometers’ 9.4605284e+12 If I travelled 800m in 9.58 seconds how many miles per hour is this? jason$ units -t ‘800m/9.58s’ ‘miles/hour’ 186.80053jason$ units -t ‘800m/9.58s’ ‘miles/hour’…

Read More

Create aliases with the Linux command line to make commands easier to remember.

Creating an alias for bash makes remembering a command easier. This is how longer commands may be simplified. Here is an example. [jason@darknet:~] alias lseasy=’ls -lAhF'[jason@darknet:~] alias lseasy=’ls -lAhF’ This is the output. [jason@darknet:~/Videos] lseasy total 4.8G -rw-r–r– 1 jason jason 18 Mar 24 13:34 authrootseq.txt -rw-r–r– 1 jason jason…

Read More

Reasons to use the text console on a Linux box.

The virtual console on a Linux box is a good way to access the command line on a UNIX or Linux system. There are a few virtual consoles available on a machine. Press Ctrl-Alt-F2 to access the virtual console. Hold the Alt key and use the arrow keys to switch…

Read More

Useful C tricks and code samples.

How to define a string and print it out with the printf() function. #include <stdio.h>   /* Defining a global string. */   #define hi "Hello Sire."   int main(void) { /* Printing out the string. */ printf("%s\n", hi);   return 0; }#include <stdio.h> /* Defining a global string. */…

Read More

Calculate subnets with the Linux command line and sipcalc.

The sipcalc utility for Linux is used to calculate subnets for IP addresses. The below example shows a /26 address and the available IP addresses and number of network nodes in the subnet. This is a good way to calculate the network mask if the network administrator requires this information…

Read More

Some miscellaneous Linux commands.

To reboot your Linux machine, use the sudo reboot command. Another way is to type sudo shutdown -r now. This command will also shut down your machine. ┌─[jason@darkstar]─[~] └──╼ $sudo init 0┌─[jason@darkstar]─[~] └──╼ $sudo init 0 Use this command to reboot your computer. ┌─[jason@darkstar]─[~] └──╼ $sudo init 6┌─[jason@darkstar]─[~] └──╼ $sudo…

Read More

Misc UNIX tips for the desktop UNIX or Linux user.

Get your uptime with the uptime command on Linux. Last login: Tue Oct 28 13:55:23 on ttys000 iMac05:~ admin$ uptime 11:24 up 111 days, 20:38, 2 users, load averages: 0.35 0.16 0.14Last login: Tue Oct 28 13:55:23 on ttys000 iMac05:~ admin$ uptime 11:24 up 111 days, 20:38, 2 users, load…

Read More

Elysium film showing real UNIX commands in a blockbuster movie.

The movie Elysium showcased some awesome UNIX shell commands. The rhost command was one, there is a more detailed show here: http://i.imgur.com/niqfmy5.png. The nmap port scanning utility is used to port scan Matt Damon`s brain before the data is copied from his neural storage to the Elysium computer system. I…

Read More

How to use SFTP on Linux and copy files easily.

This video shows how to use the SFTP command on Linux and transfer files easily. How to use sftp to retrieve files from a remote Linux server securely. https://securitronlinux.com/debian-testing/how-to-use-sftp-to-retrieve-files-from-a-remote-linux-server-securely/. Copy a file from one UNIX/Linux machine to another using the sftp utility. https://securitronlinux.com/debian-testing/copy-a-file-from-one-unixlinux-machine-to-another-using-the-sftp-utility/. How to upload files to your Amazon…

Read More