Outils pour utilisateurs

Outils du site


issue214:tutoriel

Ceci est une ancienne révision du document !


I recently read a book called Linux Unveiled, that unveiled only that the author, ‘Half-job Hussain’, had no idea how to show newbies around. I did like some of the book somewhat (very little), so I’ll be stealing some of that to do a proper job for our FCM newbies. (No - I will not be using anything from that horrible book). I’ll try to take a more hands-on approach, so I would ask you to keep your terminal emulators open and follow along, just to get the muscle-memory going. Now obviously I cannot cover a whole book’s worth of stuff on here, but I’m thinking CPU, memory and disk here. This can then tie into some of the LPI stuff we are covering elsewhere. That means there will be homework, but I’ll keep it short. Last time we left off on the auth.log log. If you are the only user on your system, I suggest adding another. I always added ed, edd, and eddie, to my training VM’s when I studied for LPI back in the day, to the point where I now do it automatically. The reason I want you to add a user or two, is so we can talk about authentication a bit more in-depth. User ids should start at 1000, the second ‘1000’ (after the colon) represents the group id. A quick way to see users from the terminal is to have a look at /etc/passwd. The file is not readable by everyone, so you would need sudo: sudo cat /etc/passwd - once we have the name of the user we wanted to have a look at, we can id the user. You can see that in the following screenshot (below).

If you look closely at my screenshot, you would have noticed that ed and edd are not alike. As Ubuntu uses bash as the default shell, bin/sh indicates to me that I have not logged in with that user since its creation. It’s just something no-one tells you, that you pick up - use it / don’t use it. ;) I use the: groups command often, to check if my user is in the vboxusers group at home, but as a newbie and a home user, you may not. If you do not use it, give it a spin now. If you plan on taking the LPI exam, this should be second nature to you. While I’m not going to squirrel off into users and groups in this series, I do suggest adding another user or two and “administering” them a bit. It creates that “muscle-memory” I like referencing. That brings me to memory. My first honest metal server had 4GB of memory and the VM on there had 1GB, so it was always a gamble. I used the free command and the top command so often, it’s not funny. Though in the LPI exam you need to be able to explain each column, including the “shared” and “buff/cache”. One of the stupider questions I got on the LPI; they removed the headers and just gave you the values and you had to label them. What that proved, I have no idea, but to the reader, beware! The other one you need to get familiar with is vmstat. (iostat and sar too, but I’ll weave those into another article).

If you are using a virtual machine, let me show you how to add another drive. The reason for this is so we can fill it ;-) Under storage, find your SATA controller and look for the “+” icon. This looks different, depending on your version of virtualbox. (I’m using virtualbox 7 here as it is available in the repositories. If you want to go another route, be my guest.) In the next window, click on “create” and then choose VDI, next, next, make it 1GB in size (if you can) and click finish. You will be brought back to the previous window and there you need to click on “choose”. Make sure the 1GB drive is selected. If you are a physical guy, I’m sure you have an old drive lying about that you could add to your physical machine. Don’t worry, we are just going to fill it to the brim, not destroy it. I trust you guys are OK with the: sudo fdisk -l command? We just want to see ‘where’ it is, sda, sdb, whatever. (If you are not, and you want some guidance, please e-mail misc@fullcirclemagazine.org and we can do a short tutorial on it).

issue214/tutoriel.1740900472.txt.gz · Dernière modification : 2025/03/02 08:27 de d52fr