Parental Advisory: Arch is highly Addictive |
Introduction:
~*~*~*~*~*~*~*
This is a subjective documentation of the author on Arch Linux, a light *nix distribution,
that's often misinterpreted as an arcane distro for so called advanced users.
This documentation assumes the audience have bookmarked the official arch wiki and have basic knowledge on *nix file system hierarchy,partition, command line and most importantly enough time for going through a non-CS guy's commentary on pre and post arch installation, building up and fine tuning own system brick by brick.
Warning: This ain't a cheatsheet or full fledged documentation on Arch, rather keeping a log of
my own experience while going through the process. In my opinion a *nix geek, from n00b to Guru, must bookmark two 'distro wikis' ---- 0. Arch wiki and 1. Gentoo x86 Handbook. They are eye openers ... Trust me.
Purpose and philosophy of Arch:
~*~*~*~*~*~*~*~*~*~**~*~*~*~*~*
Arch official philosophy is KISS == Keep It Simple Stupid !!! Or keeping a solution, that is everything,
simple.
A bit humorously, I've broke it into a recursive form Arch == Arch ain't Arcane Chodna that's in
English translation: Arch isn't an Arcane Art Stupid. An English stupid is a Bangali chodna. :P LOL.
Yes, Arch is simple. Gives a bare-bone basic or minimalistic system (1.5Gib disk space / 144 packages in my case) to the user
where (s)he can build the system according to needs and geeky experiment.
TLDR:
~*~*~*
Every *nix distro has a philosophy and comes with a package manager, without LFS, that gives its uniqueness and workforce.
Arch is NOT for so called advanced users as the installation and maintenance needs 'intermediate' skills.
I ain't an intermediate just a n00b.
OK so far so good, for the distro's history read the wiki.
Arch gives a user three major scopes:
1. A deeper knowledge of how a system works in app and hardware level -- through installation
and maintenance process. Mostly an introduction to configuration, dependency and using power tools,
the true power of *nix.
2. Giving the user to build a system (lightweight simple to heavyweight complex)
brick by brick according to needs -- that gives a godly feeling of making own OS and
getting a superior control over the system... NB: Gentoo and LFS gurus, I know the difference.
3. This is the very playground if someone wants to deep dive into the world of OS development.
From here, I would go through small sections on installation, post installation and day by day
configuration for a basic and bare minimum system without any Desktop Environment and GUI.
Installation :
~*~*~*~*~*~*~*
Unlike Gentoo, the installation process is super easy, hardly a page of wiki.
Only the hacker needs to be 'carefool' about partitions -- the aftermath is known to 'careful' users.
Hack_0$ Virtualbox before real installation. ;) yap we all know that.
Well, mounting necessary live-cd partitions to the new system's partition and chrooting
are two interesting bits that needs some further study. Those are handy in Do It Yourself
distro making out of air and trouble-shootings like 'no-grub' or 'no-bootable device found' May Days.
The total installation process is automated by a bash script 'pacstrap' that installs a base system
on the mounted root partition. Have a look at the pacstrap script that under the hood uses pacman
to install a 'base system' consists of 51 packages that are must for smoothly running a
minimal arch system. Have a look at them also !! It's a MUST for DIY OS hackings. :)
Hack_1$ Edit /etc/pacman.d/mirrorlist file before and choose the nearest mirror from your geolocation,
for me which is Chile. Then run pacstrap /mnt base command. It will fetch packages from that
mirror in shortest possible time.
The installation is complete. !!!!!!!!!!!
Add a user, set it's password and set it to sudoers.
Update + upgrade or synchronise the system with sudo pacman -Syu command.
Holla !!! We've got a nice, light weight and bare-bone system. :D
Run pacman -Qs to list all installed packages with a brief description.
Fun starts here .... :D
Days of Configuration:
~*~*~*~~*~*~*~*~*~*~*
Arch's power is it's high configurability. A user / admin must configure almost everything installed
manually or automating with scripts.
Investing some time on them regularly, personally I've got a tiny bit of experience on *nix and
my pc.
Day 1 automating network connectivity / dhcpcd:
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
By default arch doesn't start network daemon automatically. User must start the daemon manually.
Arch uses `systemd` instead of `init`. init is an older suit of software to boot, shutting down and
maintaining services in a box. systemd is a newer version of such protocol/suit to do the same.
systemctl is our friend system tool or interface to control systemd. One interesting thing of this
suit is we need not an extra cron software to assign periodic jobs. This takes care of such jobs
in convenient way with .service files. More on this later.
Now start dhcpcd -- the daemon responsible for leasing ipv4 or 6 addresses from router
giving sudo systemctl start dhcpcd.service command.
Check status systemctl status dhcpcd.services.
So far, so good. :)
Day 2 installing and configuring vim:
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
We're not going to use any window manager or desktop environment. So, for writing prose, poetry and codes
we'll use vim. Install vim.... hold on !!!
Before installing update or synchronize the system core commanding sudo pacman -Sy. Often it's wiser
to command for a full system upgrade using another 'u' flag sudo pacman -Syu. Why ? This is because
Arch is a rolling release distro. It always adds up to date versions of software. So a synchronization
and a system update is handy to resolve any dependency of that package with working system.
Now install vim commanding sudo pacman -S vim. My minimal vim config or .vimrc file is here.
Day 3 configuring fonts:
~*~*~*~*~*~*~*~*~*~*~*~*
Already we've noticed the fonts are too small to focus. To resolve this problem list available
console fonts typing ls /usr/share/kbd/consolefonts/
now we can set font setfont fontname.size.format. Straightforward ? Yap !!
but now if we logout the font would again go to previous smaller size.
Hack_2$ if a command is bigger to type use alias / what is commanded more than once should be automated.
Here .bashrc comes handy. After every login this file will run the configs and commands.
so include 'setfont fontname.size.format' here.
I'm lazy enough to write various longer commands e.g. sudo shutdown -h now. Here comes the
aliasing. Add alias sd='sudo shutdown -h now' to .bashrc. Logout and login. Type sd and it'll want sudo password for shutting down.
Nice Hack !!! Isn't it ?? But wait, here's a bit 'carefool' thought:
DO NOT create an alias that clashes with existing one like alias ls= 'rm -rfv'.
Here's my .bashrc file.
Day 4 installing python:
~*~*~*~*~*~*~*~*~*~*~*~
Aside from fueling my quest towards the wonderful world of hardware and systems, the second most
geeky purpose Tux Ibn Torvalds serves is network programming.
Presently I'm interested in two topics: 1. Systems and 2. Network.
Needless to say, *nix comes a trusted friend to serve those purposes. Bash is installed as part of
base, but python needs to be installed manually. Yes I ain't going to use bash for network programming
and web scrapping and python is not wise for automating al the system tasks -- there's arguments and I'm
not a pro developer. Who cares ? No offence plz. :) <3
I would search pacman -Ss "^python$" for only the python language available on my package database or
mirror. Else the output would enlist all packages those contains "python" string.
Install it with sudo pacman -S python and test it after installation
python -c "import os" . No error message. Holla !!! We've done. :D <3 :*
Day 5 further configs:
~*~*~*~*~*~*~*~*~*~*~*
So far this was my very basic setup for pursuing the quest towards the world of systems and network
programming for the year 2019. This year I would go for learning more about systems and network with
two tools Bash and Python under my belt.
Most configuration files are at /etc and local configurations are at dot files/directories in home
directory.
I'm still a n00b and have to go a really really long way .................
Conclusion:
*~*~*~*~*~*
Arch comes with readymade binaries that are building blocks of a system while Gentoo, that I was
intended to play with in 2019 but could not due to shortage of time for investing more attention
and time in practicing guitar and pencil sketch, builds everything from source. This gives Gentoo
almost a godly power of fine tuning the OS with the system.... against huge compilation time.
But, install or not, Gentoo wiki is a great place for in depth study how *nix works with system.
It's also gives introduction to know more about hardware.
However, Arch is also a nice choice for wannabe sysadmins, geeks or who wants to develop sound
foundation on OS development cause it gives a very tiny and explorable system to play and hack with.
I would suggest my penguin friends to bookmark both the wikis and suggest two keep great books
in shelf:
Operating System Concepts by Silberschatz, Galvin and Gagne
Unix System Administration Handbook by Nemeth, Snyder, Seebass and Hein
and two extra pluses for Linux System Programming by Robert Love and the epic Eric S. Raymond's blog entries.
I'm not a developer, not good at programming either, but trust me.. Those books are Morpheus who awakens someone from the matrix.
I've forgot to tell about installing a utility bash-completion that enable tab completion of commands and their flags.
PS: I was intended to keep the system without any window manager. However, the black screen is
creating pressure on my eyes. Will next install fluxbox and xfceterm for giving less stress on
eyes. The configuration files will also be available on my git. Your constructive opinion, criticism,
bullets, viruses and roses are welcome. <3
Dot files are available here. Updates will be added here.
Sincerely,
Faquir Foysol
A 90s script kiddo :D <3
Comments
Post a Comment