0x000: Cheese’s Minimal Debian Guide: Part One

Let us break Debian!

Every now and again I like to mess around in a GNU/Linux environment – and by mess around, I mean needlessly mess with configuration files and ricing until I inevitably break something and have to start from scratch. I am a Windows 95 generation kid and even after years of playing with a variety of distros, I still suck at Linux-ing. This has yet to curve my enjoyment or enthusiasm towards Linux. Nonetheless, the urge to tweak, hack and break arose again recently and I decided this would be a good place to start the blog side of this site thing. Issa long ass blog post.

20694_10152910611838347_6500209262530747984_n

I bought a piece of shit Lenovo x301 Thinkpad (read: Stinkpad) from an ex-government computer distributor for about $120 AUD three years ago. It came with Windoze 7 64bit and a metric shit tonne of windows related bloatware. The tiny 60GB SSD was cluttered, the 4GB of RAM was virtually all but consumed (by Windows 7 on idle that is), the webcam didn’t work at all, one of the speakers grill has fallen out, the battery doesn’t hold charge at all, the wifi NIC recently failed, the chargers chord is an electrical hazard and overall the laptop is prone to overheating and burning the shit out of your lap. All of these things were not immediately obvious when I bought it, and are slowly and surely getting worse – but I didn’t acquire this piece of E-waste for its functionality, oh no. I bought this laptop because I fell for a meme on an anime image board.

But in all seriousness I actually bought this laptop because it was cheap and fun way to dabble in Linux outside of a virtual environment. I replaced both the battery and charger, use a USB wifi NIC and don’t put it on my lap. The webcam started working a fair few Debian installs back, and I foresee many more years of breaking and hacking out of it. Here’s to you trusty Stinkpad.

This post is dedicated to my process of installing a minimal af Debian environment on my Stinkpad. It could be considered a rough guide or tutorial to starting Debian with nothing but a terminal -> a desktop environment that makes you look like a h4xx0r to all your normie friends (what would I know, I don’t have any friends) – but like I said, I suck at Linux-ing. There’s far better resources out there for you to learn from about Linux and this blog post is mostly a joke misinformation. Links to relevant information will be provided where I couldn’t be bothered completely explaining what it is I am doing. As a tutorial it’s aimed at “Hurt Me Plenty” level Linux users.

1512121239626
Bonsoir, you weird looking dude.

Disclaimer: if you break your computer following this guide, lol.

Step 0: Install Debian

Install Debian – not Ubuntu, not Arch, not Gentoo – fucking Debian and only Debian. I kid, use whatever distro you like, it’s really not that important given the world we live in. There are pros and cons to every Linux distro, it’s up to you to work out which one you want to use. However I highly recommend Debian. I’m not going to walk you through this – if you can’t install Debian yourself, turn back now. The only thing I will stipulate (for the sake of minimalism, software / HDD space wise) is at whatever point during the installation it asks you to choose software to install; you DO NOT install a windows manager or desktop environment. The screen looks like this in Debian:

Untitled

Note that this screen is a bit weird button wise. To deselect an option, you use the space key not return, as hitting return will continue with the installation. I mention this because this used to always fuck me up until I learned to actually read the installer. Deselect all the options besides ‘standard system utilities’, exactly as pictured and finish the install. Another noteworthy mention of Linux installation fuckery is the partition disks screen(s).

Ultimately starting out without the fancy desktop environment that GNOME, Xfce, KDE, Cinnamon, MATE or LXDE provides is overwhelming and intimidating for beginners, but really if you are actually interested in learning and working with Linux, you should get used to working in a command line environment. Going about your install of Linux this way will force you to use and ultimately learn the command line. Another reason why I opt to not used any of those desktop environments is because they come with a shit load of bloat and useless packages (at least in the sense that I’ll never use them) which will take up hard drive space – I’m all about running on the bare minimum required to function. It also adds (when we install and configure the i3 window manager – which is covered later on) as I mentioned earlier, a h4xx0r aesthetic to your otherwise boring life. You might seem interesting to someone looking over your shoulder in a cafe or uni class! But I highly doubt it; nothing will save you from your own mediocrity – but especially not Linux.

Step 1: Initial Setup

debian-9-first-login-screen-minimal-setup

Hopefully you’ve successfully installed Debian and have successfully booted it for the first time. You’ll be greeted with a black login screen that surprisingly works like every other logon screen you’ve ever seen minus the graphics. Login to your root account and apt-get update && upgrade that shit. You might want to adjust your /etc/apt/sources.list prior to this but whatever dude its your life.

root@debian:~$ apt-get update
root@debian:~$ apt-get upgrade

Now all your shit is up to date and we can continue down the path of misinformation and potential destruction. I’m not going to explain any command in great detail in this guide thing, but I will say what these ones do is pretty obvious (and kinda important).

It’s now time to install and set sudo up so we can logout of root (because we are far more likely to fuck every thing up irreparably from within the root account) and continue with the rest of configurations from the relative safety of our own account (which we set up during the installation of the OS) – bearing in mind we can still fuck things up pretty badly from a user account using sudo (there’s just a few more extra steps involved in truly and spectacularly fucking your shit up). Once sudo is installed, add your user account to the sudo group and restart the machine.

root@debian:~$ apt-get install sudo
root@debian:~$ adduser jonno sudo
root@debian:~$ shutdown -r now

The reason why I suggest restarting at this point is I have noticed that if you log out of root and log into your not root account and try use sudo immediately, it doesn’t register your user as having appropriate permission to use sudo – even though you literally just added yourself to the sudo group.

3fc6532ee77569a992a684051054f6baf6ee7b27bb47da47c27c85581c7ff9c6

Step 2: Install All The Softwares

Now we’re good to go with the rest of the configurations. Log into your user account and begin preparing to install every single piece of software that you’ll use. I’m not just talking about web browsers, music players or whatever other things you use in your day to day life on a computer – I mean right down to the software which renders those applications on screen, the software used to lock the screen or even the tool which displays an image as a wallpaper – because we opted earlier to not install those things. Often background tasks you don’t have to worry about and take for granted in every other OS. Yes, shit is about to get real. Sort of. But not really.

First of, install xorg. This piece of software is responsible for creating a graphical session, it provides all the back end stuff for windows and menus that will be rendered by a separate piece of software called the window manager. It’s light weight af and runs on every Linux distro. Note you’ll have to use sudo from here on out. It’ll prompt you for your password initially.

jonno@debian:~$ sudo apt-get install xorg
[sudo] password for jonno:

If you didn’t fuck up adding your account to sudo, it should then install xorg. Now that x is successfully installed, I generally install everything else I’ll need by issuing the following command:

jonno@debian:~$ sudo apt-get install firefox-esr i3 mpv ncmpcpp feh scrot screenfetch i3blocks

You don’t necessarily need install the same software I have, in fact I encourage you to go out and find your own personal favorites given the vast quantity of open source software available on Linux. Say you want a file explorer cause you grew up on Windoze and don’t know how to navigate around a computer without Windows Explorer (like me), so you install one – but which one? Unlike Windows you aren’t forced to use any particular piece of software for any kind of operation, and there are literally thousands of choices for anything from a file explorer, to a windows manager, a text editor, a media player, a terminal etc. The options are endless. But we’re not installing a file explorer, because we wanna look like 1337 h4xx0rs / learn how to navigate the system via a command line.

Here’s a brief description of the software we just installed:

  • firefox-esr: standard web browser, the most bloat heavy piece of software I use. I stuck with the ol’ GUI web browser because I’m yet to see a command line interface web browser that doesn’t suck.
  • i3: a minimal, light weight ‘mixed’ windows manager. It’s as dynamic and custom as you want as well as very easy to set up and configure. Literally the only reason this post was made really, muh aesthetics.
  • mpv: open source fork of Mplayer. Light weight media player that I use specifically for video. Can be used to replace web site specific video players, like youtube or pornhub.
  • ncmpcpp: command line music player that requires a cheat sheet to operate.
  • feh: simple image viewer. I use it to render wallpapers. I do not know why it is called feh.
  • scrot: command line version of hitting your PRT SC key and then pasting the buffer into mspaint or some shit, except you determine the output file name, location and format immediately. Which is a billion times better than the aforementioned method.
  • screenfetch: script that displays all your system information for all those desktop ricing threads you post in no longer post in, because desktop threads are now kill.
  • i3blocks: a bar for displaying a variety of system information (i.e. the date and time, volume level, disk space etc). Integrates into the i3 windows manager. Is open source and very easy to customize and adapt.

Now start x (which will initialize xorg as well as i3) by issuing the command below. At the moment, every time you log in to your Debian environment you will have to issue this command to have a desktop environment.

jonno@debian:~$ startx

Boom! Welcome to your new minimal Debian desktop environment. A window should initially pop up asking you to configure your modifier button for use with i3, this will only happen once. If you haven’t ever used i3 before I recommend as well as reading the fucking manual, spending at least half an hour memorizing the shortcut key cheat sheet or this, ’cause now its time to rice this shit up.

Continued in Part Two.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s