LINUX is a derivation of AT&T’s UNIX as developed by Linus Torvalds and now owned by the Linux Foundation. A great source for reading about LINUX commands is the Linux Documentation page. Much of the material in this article comes from the EdX course:
Linux Foundation X: LFS101x Introduction to Linux
The name LINUX derives from the first letter of Linus Torvalds name and the letters from “UNIX” jumbled in a way that is easy to pronounce. LINX is a multi-tasking environment, more that one process can be running at the same time.
File System Hierarchy
LINUX follows the UNIX file structure, as explained in the Operating System’s File System section File System. Everything in UNIX is stored in a file, including the various components of the core operating system. Core executables are store in /bin, while secondary executables are stored in /usr/bin. If you want to find out how to use a particular user accessible executable, use the man command to bring up one of the files in the /usr/man directory/folder. Every file/folder in LINUX is stored under the base “/” directory (folder). Unlike Windows, where items are mounted with a base letter (like the main disk is mounted under C:), UNIX mounts all devices under the main file structure. Often /mnt (for disks) or /dev (for peripheral devices) are used as mount points. The device is then symbolically linked to where in the directory structure the information is desired.
Installation/Update
The diagram in the LINUX Foundation X section shows the various distributions of LINUX. Standard installation requires the use of a CD/DVD or USB drive. The kernel is updated every three months, but releases of each of the distributions varies, depending on the needs of the users of each distribution. For example, ATMs need a stable system. Therefore, they are usually only updated for critical defect fixes or required feature updates.
Each installation media has its own file which is used for installation. Each installation method tries to make the process as easy as possible for the end-user. The three distribution groups have their own installation process. The three major groups are:
Distribution Group | Installation File |
---|---|
Fedora | Kickstart |
SUSE | AutoYAST |
Debian | preseed file |
Initial instillation is either primary (the whole disk is reformatted) or dual-boot (where the system can either boot LINUX or another system, mostly Windows).
Ubuntu on Windows 10
There are three ways to put LINUX on a Windows 10 PC.
- UBUNTU Linux on with BASH Shell on Windows 10 – Window System for Linux (WSL) base
- Oracle’s VirtualBox
- Dual Boot
What I am using is Ubuntu Linux on Windows 10. It is simple to install. Microsoft has a description of how to install it. Scott Hanselman also has an interesting video describing how to install Ubunto (BASH – Born Again Shell) on Windows 10. When you first bring it up, it will ask for a user name and a password. You need both to be able to run as a super user. You will not have root access except through the Super User do (sudo) command, so choose your password carefully. When you run the sudo command you will be prompted with the request for your password on a line that does state your user name. To be able to run as super user, you must identify your host in the /etc/hosts file. The UBUNTU file system is a real LINUX file system, but it is stored under windows at:
C:\users\<your account>\AppData\local\Lxss\rootfs
The Lxss directory is a hidden directory, so you may not see it at first. To recognize your host, the first file that needs to be changed is:
C:\users\<your account>\AppData\local\Lxss\rootfs\etc\hosts
You need to add your local host’s name with the address of 127.0.1.1. You local host’s name should be found in the hostname file in the same directory. To use the apt-get command, you will also have to add the Ubuntu addresses. There are three different sets of IP addresses I have seen for the two Ubuntu sites. The recommended ones are commented out. The ones I found through http://ipaddress.com/ip-lookup/ are uncommented. But the second time I went here, the IP address of archive.ubuntu.com changed again. Assuming your hostname is “MyHost” and these are the URL addresses you have for the Ubuntu sites, you will have:
# Local host identification - as set by system 127.0.0.1 localhost 127.0.1.1 <yourHost>.localdomain <yourHost> # Recommended IP addresses for these URL's # 91.189.91.13 archive.ubuntu.com # 91.189.92.201 security.ubuntu.com # Used ipaddress.com to see what IP addresses my system thinks where these two URL are located. # Recommended IP addresses for the following URL's 91.189.88.149 archive.ubuntu.com 91.189.91.23 security.ubuntu.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
You can either edit this on your PC with Notepad or on the bash shell with vi. The difference is that the bash editor puts in only a carriage-return at the end of each line, while Notepad puts in a Carriage-return plus Linefeed. Be consistent on where you edit this file to have it look nice. The apt-get command is used for retrieving applications from the UBUNTU app-store.
BASH Updates
When you open your BASH shell, there may be updates to your UBUNTU Linux available. This is indicated by lines similar to:
29 packages can be updated. 6 updates are security updates.
You can retrieve these updates by the following commands:
sudo apt-get dist-upgrade sudo apt-get update sudo apt-get upgrade
All of the commands may not be necessary, but it does no harm to try.
Changing the Appearance of the BASH shell
On the upper left hand corner of the shell is the UBUNTU logo. Click on that. The last entry is “Properties” which needs to be selected. For colors, I like light green on dark green. For Font size, I usually use either 12 or 14 point font. With this set-up you have full access to all of the Linux commands. Please remember that this is still set on the WSL kernel and not the Linux kernel.
GUI for Linux
The X11 library does not work “as-is” on the UBUNTU BASH shell. Microsoft recommends using XMING on BASH. To download XMING, I did a search for XMING download and selecting the sourceforge.net download location. On the Microsoft Channel 9 page, they cautioned about putting in too much information on this website. The download does happen without you supplying any information. Put the setup program in a known location and run it. Use all the defaults until you see the last set-up screen with the choice of [] Create a desktop icon for Xming. Then complete the installation. At this point, you are ready to install some cool X11 applications by typing:
sudo apt-get install x11-apps
There may be some verification questions on the download. Answer them and the installation will occur. Microsoft has a good description of how to install Xming and x11-apps by Paul DeCarlo. Was both Xming and the x11-apps are installed, you can enable the DISPLAY to point to your local host display by:
export DISPLAY=localhost:0.0
Also, if you would like to play some included games, you need to make sure that the /usr/local/games and /usr/games directories are in the PATH variable. To check, type echo $PATH. If not, they need to be added to your PATH by creating a new PATH value that includes the old PATH value, which is referenced with a $ in front of the variable name:
echo $PATH PATH=$PATH:/usr/local/games:/usr/games