Arch Linux. Not as scary as you think.



Yes I'm a nerd. Yes I use Arch Linux.
There is a somewhat unfair view that you have to be a programmer to use Linux, and that Arch Linux in particular is very difficult.
Yes I happen to be a programmer, and it might be true that Linux may be particularly useful for programmers considering most distros come with a lot of editors and compilers and such. But it really is a really stable and powerful OS for anyone (that's not computer illiterate).

If you want to just use your computer without having to thinking about it, you will probably use whatever Windows version your computer came shipped with, and not bother to install anything else.
However if you actually want to Learn how to use Linux, Arch is a good choice, because it assumes you know how to use the command line during the install process. In other words the process of installing it forces you learn som basics of Linux (if you don't already know). Still it is not very difficult. You don't have to compile source code or configure the kernel and things like that (as you would in Gentoo for instance). Arch also take the approach that it installs a minimal number of programs and then lets you, the user, decide exactly what programs you want. This does of course assume you actually Know what programs you want. In later posts I will suggest some that I like and probably mention some other options.


It is in fact (technically) possible to install Arch Linux with just One command at command line:
parted /dev/sda mklabel msdos;parted /dev/sda mkpart primary 1MiB 100%;mkfs.ext4 /dev/sda1;mount /dev/sda1 /mnt;pacstrap /mnt base linux;genfstab -U /mnt >> /mnt/etc/fstab
However this does not install a bootloader, which means although you technically installed the OS, it is not actually possible to boot in to it. To properly install Arch And a bootloader, you must actually run at least Two commands. After booting up the install media run this command:
parted /dev/sda mklabel msdos;parted /dev/sda mkpart primary 1MiB 100%;mkfs.ext4 /dev/sda1;mount /dev/sda1 /mnt;pacstrap /mnt base linux grub;genfstab -U /mnt >> /mnt/etc/fstab;arch-chroot /mnt;reboot
After that run this command:
grub-install --target=i386-pc /dev/sda;grub-mkconfig -o /boot/grub/grub.cfg;exit
Now you have successfully installed Arch and can boot up your system. (It actually works, I've tried it on a virtual machine).
WARNING: Don't actually use these commands! They assume you have an unformatted harddrive at sda, which may not be the case. If you have stuff on your drive you have now successfully removed all of it!
Also you would probably like to configure your network to get internet access, set up you language locales and so forth. This could of course be done after install, but you probably want it done sooner rather than later.

I show these commands half-jokingly. I realize it may come off as a bit scary for those of you who don't know how to use the command line. But it really isn't That difficult, and if you actually want to Learn Linux you really should start with the command line, and installing Arch is a great first step. It forces you to learn some basics of Linux, and you will feel proud to have accomplished something! As a bonus your computer won't run dozens of services you don't actually use, that only serves to slows down your system which is the case with such distros as Ubuntu (that is admittedly as easy to install as clicking 'next' a couple of times).

Here's how my Arch Linux for every day use looks.


I plan to write a simple case-study for installing Arch, step-by-step, on a SATA disk with Swedish keyboard layout and locales and ethernet DHCP connection (as that is what I use), if you have other preferences just substitute those part, if not immediately apparent how, I refer you to the official Arch Wiki.

In case you really know Nothing of the Linux command line, here are the very basics of navigation and manipulation. (These should not actually be needed for the installation process.)
pwd
stands for Print Working Directory. It shows what directory you are currently in. (This may be considered somewhat outdated, since nowadays that information is usually included in the prompt.)
ls
lists files in current directory.
cd <directory>
change directory. substitute <directory> for the name of the directory you want to move in to. Type cd .. to switch to the parent directory.
cp <file> <target>
copy a file.
rm <file>
remove file.
mv <file> <target>
move file. If the target directory is the same as the file is already in, this command can be used to rename a file.
man <command>
Shows the manual page for the command.
This is a great first step if you wonder how to use some software you are unfamiliar with. Many beginners in particular may not realize they have manuals for how to use the system integrated in the actual system. Start with the man pages before searching online!

Comments

Popular posts from this blog

Carolus Rex

BASIC

Binary Numeral System