First off, we need to establish that we have an Internet connection. We do this by using ping command.
Next, we need to tell systemd to start the DHCP service.
Then we need to test the connection using ping.
On VirtualBox, I had an issue with ping returning each packet with its own duplicate (DUP!). I fixed this by switching the VM’s network device from using a ‘Bridged Adapter’ through my Wi-Fi to NAT. Restart DHCP to reconnect. We should have DHCP start on boot so we have a connection when the computer loads. To do this we use the ‘enable’ command in systemctl.
The ‘–now’ parameter tells systemctl to start the service as well as enabling it.
We must create at least one other user to use as the main account on this computer. Using the root user as the main account is extremely bad practice. Root has access to the entire system. You can wipe out very important files with one simple command under root. ALWAYS use a user account. The tool we will use for this is called ‘useradd’.On its own, when given the name of the new user, it will create’ the user with the default options specified in the file ‘/etc/useradd/defaults’. When the ‘-D’ option is specified (‘useradd -D’), it will list the defaults that useradd uses when no other parameters are specified. Let’s see a little list of parameters that it accepts:The ‘-m’ parameter creates the home directory if it doesn’t already exist. When used on its own, which is what we will do, it will create the user and its home directory in the default base directory (‘/home’). The directory name will be the user’s username, e.g. unix_allsort’. The username must not contain spaces.
We can change which directory the user’s home folder is by either changing the base directory (the ‘-b’ argument), or the home folder name (using ‘-h’) or both. We can also specify the user’s group, its own group ID (GID), and own user ID (UID). Run ‘man useradd’ for more information.After a user is created, we should assign a password to it. We will begin by using ‘passwd’ to assign one to unix_allsort. You will be asked to provide the password twice to ensure that there was no mistake the first time.
Now we need to ensure that the latest software packages are installed before we install any other programs. Again ‘pacman’ will be used for this purpose. Ensure that you are the root user, then begin updating your new system. Please look at the Arch Wiki for extra information about things you should be aware of when upgrading your system.
The update will also update the initramfs image and its fallback.
Once completed, we can then begin to install other software. We will first install a GUI environment consisting of FVWM (window manager), and of course Xorg (X11 server). We shall run these three pacman commands:
We will need xterm if we want to use the terminal during an X session.In order to launch fvwm when ‘startx’ is run, we must copy the xinitrc template from ‘/etc/X11/xinit’.
Then open up either nano or vim to change what gets launched. Scroll down to the bottom of the file. There you will find the list of things it attempts to run. By default, it will try and run ‘twm’, which is another window manager. Since we don’t have twm installed, it won’t work. As for xclock, we can install that later. Once xclock is installed, it too will run, unless you remove the command of course.The best thing we can do is simply tell X to only run FVWM when ‘startx’ is run. We do this by either removing the other commands or make them into comments by putting ‘#’ before them. This ensures that X only closes when FVWM does.
Remember to have only ‘fvwm’ there with the ‘&’ at the end removed.Now save and then run ‘startx’. FVWM should start correctly. With it, you can then invoke ‘xterm’ by clicking on the desktop and pressing ‘XTerm’.
Excellent, we shall now continue installing programs. While we’re in FVWM with an XTerm open, let’s install Firefox. Remember to run ‘pacman’ as root. Switch to root, using the ‘su’ command.As stated before, the great thing about Arch is that it is completely customizable. I’ve installed Firefox, Thunderbird, and another window manager called ‘IceWM’. Let’s try installing the KDE 5 plasma desktop.
Once completed, you should edit ‘~/.xinitrc’ once more so that ‘startkde’ is the only thing that runs. After saving the changes, then launch X again. You should have a KDE plasma session running.
Now that we have a system set up with some software installed, we will look at several different ways to customize the system. Other configurations will be looked at as well.
The ‘-m’ parameter creates the home directory if it doesn’t already exist. When used on its own, which is what we will do, it will create the user and its home directory in the default base directory (‘/home’). The directory name will be the user’s username, e.g. unix_allsort’. The username must not contain spaces.