Let me share one of my experiences with linux for linux starters. Since before you install a linux distro make sure you understand the directory structure well because we don't want to get PITA later when we earn better knowledge on it.
Let's assume that you just earned new knowledge of hardening the linux system after couple of months later with your linux system as your daily machine and you have precious data on it that you really don't want to be stolen, you are too far away from the start point which you just had started with an idea of "uh, best way to learn linux is use it" without thinking of any preparation for the future risks though. It would really make you PITA because as the very basic of a system hardening we start thinking of password, encryption, how we protect the boot partition, how will we save our data etc.
By the way ; in case you don't know what is hardening; let's take a quick peek of what is Hardening-- according to wikipedia; In computing, hardening is usually the process of securing a system by reducing its surface of vulnerability. According to ISECOM's OSSTMM https://www.isecom.org/OSSTMM.3.pdf , it's one out of 10 controls to secure an asset to separate an asset from a threat.
Don't get confused too much just make sure to understand what are /boot (grub) and swap space partitions, what are / (root), /home, /etc, /usr, /bin, /opt, /tmp, /dev , /media, /mnt directories and how they work, how should we allocate them before you go. Because It’s important to have different partitions to obtain higher data security. Plus: you should also make sure to encrypt your External Hard Disk where your backup or saved sensitive data on it.
About some of them:
/boot: The directory contains files required for starting(booting) your system. Be-careful with it, if you mess up even with a single file in it your linux will not be appeared. It is a pain to repair.
grub: is a bootloader package short for GNU GRand Unified Bootloader. It provides a user the choice to boot one of multiple operating systems installed on a computer or select a specific kernel configuration available on a particular operating system's partitions.
swap: According to the name itself -- Linux uses swap space to increase the amount of virtual memory available to a host to swap when RAM is filled. Swap space is the second type of memory in modern Linux systems. The primary function of swap space is to substitute disk space for RAM memory.
/ (root): is the root directory the top level of the file structure and it's home of superusers (root)/ Administrators/ Chancellors. It is separate from the users’ home directories.
/home: Important! Contains the home directory for users and other accounts. P.S you will save your data in your user's home directory by default which is resembled to the "C:\Users\%username%" on a windows system. So it contains Documents, Downloads, Desktop, Videos, Pictures, .ssh , .bash_history, .bashrc etc.
/etc: Important! Comes from "et cetera" as system files will be put in here if we don't specify where to put. Supervisor directory commands, configuration files, disk configuration files, users, groups, ethernet, hosts, issue, passwd, shadow etc..
/bin: This contains binaries and executable files. These files are available to all users. Eg: ls, cat, tac and so on. Eg: Type "which ls" command in terminal and check to see what happen.
/opt: Where you install third party applications or compiled applications.
/tmp: contains temporary files, usually placed there by applications that you are running. For example: During downloading and installation of system or application updates , some or many of applications used /tmp directory to run temporary executable.
Things to do at your first time:
Since from the installation you make sure to install with Full-disk encryption (FDE).
Make sure to separate the following files partition : And make sure to install third party applications under the /opt file system in the future. And make swap partition at least 2 times of your existing RAM. For example if your RAM is 8 GB , make your swap space 16 GB.
Think first the required space that you may need for your root (/) directory ( usually it's enough 50 - 100 GB) and grub (/boot) - ( 100M is enough for boot partition ) and swap ( 2 x RAM size) and keep the rest space for /home directory.
AND grab your coffee because all things set! Now , you may proceed the installation in peace. With this current understanding of how it works at your first date with the linux of your choice distro your future with it is surely peace out !
For those who didn't use FDE:
Use gparted to resize / move your partitions
Use veracrypt or creptsetup with luks filesystem to encrypt your partition or external hard-disk.
Use partclone to backup your system (Before you do resize / anything dangerous don't forget to get a backup)!
Well, that's it.
That's how the teens of Hacker Highschool https://www.hackerhighschool.org learn how things work and with the advantages of the information they have together, they use "Hacking" to get things work!
Thanks for reading!