Thursday, 18 October 2018

Some basic Linux shell script commands

All Linux operating systems have a terminal that users can type commands in. It is basically the equivalent of the cmd. of Windows OSes. It is much more useful in Linux though, as it provides a lot more functions than the Windows command terminal, which is why it is imperative for a Linux user to at least know the basic commands that can help troubleshoot, save time, or make it more convenient for the user.

man (command): Linux conveniently has a page that explains the function of every command. If you don't know what a command does, just type man(command) to open up the page that explains it.

sudo: Changes the user to the superuser or root user. Sudo is basically the Linux version of an administrator on Windows. It allows a user to view and edit other user's files and install packages, among many others.

ls: Probably the most simple command. It lists the contents of the current directory that you are in

cat (file): Stands for concatenate, it prints out the contents of a file into the shell so you do not have to actually open the file to view its contents

cd: Stands for current directory, it is used to navigate between directories. The command cd returns you to your home directory. The command cd .. returns you to the next higher directory than your previous directory. To move into a directory, simply type cd (directory name)

ping: pings a website address and prints the time it took for them to return. This is a convenient way to test if your internet or a website is down or not.

df: Prints out the device's current disk space usage

apt-get install (For Ubuntu) or yum install (for Fedora): Allows the user to choose from and install thousands of different packages and software. Requires superuser. For example, to install the command cowsay, which prints a cow saying something, you simply have to type sudo apt-get install cowsay and it will start downloading.

sl: Probably the most fun command, stands for steam locomotive. It cures one's bad habit of mistyping as many people accidentally press this when typing, the much more common command ls. It displays an animation of a train chugging from the right side of the screen to the left side of the screen. You have to install it by typing sudo apt-get install sl.

Friday, 2 March 2018

Soddy Circles

Soddy circles are named after Frederick Soddy, who in 1936. He proved that given three circles that are tangent to the other two, exactly two circles can be drawn that are tangent to all three; one very big circle, and one very small circle. I used Geogebra to draw these circles. The three red circles are all tangent to each other. The big, blue circle is tangent to all three at the points P, M, and O. It is called the outer Soddy circle and its centre, R, is called the outer Soddy centre. The smaller blue circle that is in the middle is called the inner Soddy circle, and its centre, S, is called the inner Soddy centre.