issue213:tutoriel
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue213:tutoriel [2025/02/01 19:12] – d52fr | issue213:tutoriel [2025/02/03 19:17] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | 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. | + | **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. |
- | Say you logged on to a friend’s computer and the prompt did not display the name of the computer, you could use the hostname command to get that information, | + | Say you logged on to a friend’s computer and the prompt did not display the name of the computer, you could use the hostname command to get that information, |
- | You could see “desktop” or “laptop” on your machine instead, and if yours did say either, you would not see “Virtualization”. | + | J’ai récemment lu un livre intitulé Linux Unveiled (Linux dévoilé), qui révélait seulement que l’auteur, « Half-job Hussain », n’avait aucune idée de comment montrer les choses aux débutants. J’ai un peu aimé certaines parties du livre (très peu), donc je vais en voler une partie pour faire un travail correct pour nos débutants FCM (non, je n’utiliserai rien de cet horrible livre). Je vais essayer |
- | Now, if I needed more information | + | Supposons que vous vous êtes connecté à l’ordinateur d’un ami et que l’invite n’affiche pas le nom de l’ordinateur, vous pouvez utiliser la commande hostname pour obtenir cette information, |
- | Most of you know: df -h - to see information on how full - or empty - your drive is and: free -h - to see the same about your memory. A favourite of the LPI exams is: uptime, though in my whole career, I have never needed to type that command once in the real world(!), we just have so many better tools, for instance, I can see the uptime in: htop - and usually I have some form of monitoring software installed to get a better view of load over time. I love that there are many ways to skin a cat in Linux! Hehe, yes, I suppose lolcat would be “skinning” your terminal output... but you know what I mean. | + | |
+ | **You could see “desktop” or “laptop” on your machine instead, and if yours did say either, you would not see “Virtualization”. | ||
+ | |||
+ | Now, if I needed more information on my OS, I could try cat / | ||
+ | |||
+ | Vous pourriez voir « desktop » ou « laptop » sur votre machine à la place, et si la vôtre indiquait l’un ou l’autre, vous ne verriez pas « Virtualization ». Nous pouvons voir le nom du système d’exploitation, | ||
+ | |||
+ | Maintenant, si j' | ||
+ | |||
+ | |||
+ | **Most of you know: df -h - to see information on how full - or empty - your drive is and: free -h - to see the same about your memory. A favourite of the LPI exams is: uptime, though in my whole career, I have never needed to type that command once in the real world(!), we just have so many better tools, for instance, I can see the uptime in: htop - and usually I have some form of monitoring software installed to get a better view of load over time. I love that there are many ways to skin a cat in Linux! Hehe, yes, I suppose lolcat would be “skinning” your terminal output... but you know what I mean. | ||
Before I move on, let’s quickly look at what we covered in that short piece: | Before I move on, let’s quickly look at what we covered in that short piece: | ||
• hostname, hostnamectl, | • hostname, hostnamectl, | ||
- | • 12 commands in 5 minutes; you are on a roll my friend! | + | • 12 commands in 5 minutes; you are on a roll my friend!** |
- | One way of finding out what you are dealing with, when troubleshooting, | + | La plupart |
- | You should know that dmesg is not the only way to see what is/has happened during your boot. You could also look at the boot log: tail / | + | Avant de continuer, regardons rapidement ce que nous avons couvert dans ce court article |
+ | ••hostname, | ||
+ | ••12 commandes en 5 minutes ; tu es sur la bonne voie mon ami ! | ||
- | Your homework, erm, mission – should you choose to accept it – is: | + | |
+ | **One way of finding out what you are dealing with, when troubleshooting, | ||
+ | |||
+ | You should know that dmesg is not the only way to see what is/has happened during your boot. You could also look at the boot log: tail / | ||
+ | |||
+ | Une façon de savoir à quoi vous avez affaire, lors du dépannage, est le fichier journal, ou devrais-je dire les journaux, car il y en a pas mal. Le principal que j' | ||
+ | |||
+ | Vous devez savoir que dmesg n'est pas le seul moyen de voir ce qui se passe/ | ||
+ | |||
+ | |||
+ | **Your homework, erm, mission – should you choose to accept it – is: | ||
1. To look inside the /var/log/ directory and poke around in some of those log files. In particular, I want you to check the logged-on users with the command: w - and then check auth.log to see those users. On some servers though, the logs may be sent off to a log server, so I would suggest doing this on your own desktop/ | 1. To look inside the /var/log/ directory and poke around in some of those log files. In particular, I want you to check the logged-on users with the command: w - and then check auth.log to see those users. On some servers though, the logs may be sent off to a log server, so I would suggest doing this on your own desktop/ | ||
2. To type sudo dmesg and type the password wrong three times. I then want you to go and look at / | 2. To type sudo dmesg and type the password wrong three times. I then want you to go and look at / | ||
Ligne 25: | Ligne 47: | ||
We covered the ‘where’ “where am I”, and the ‘how’ “how do I check for errors”. ‘When’ you are is not important, but if you really have to know, type: date ;) | We covered the ‘where’ “where am I”, and the ‘how’ “how do I check for errors”. ‘When’ you are is not important, but if you really have to know, type: date ;) | ||
- | As always, should you find an error, or think I helped you in a wrong direction, please let us know on: misc@fullcirclemagazine.org | + | As always, should you find an error, or think I helped you in a wrong direction, please let us know on: misc@fullcirclemagazine.org** |
+ | |||
+ | Votre devoir, euh, mission - si vous choisissez de l' | ||
+ | 1. Regarder à l' | ||
+ | 2. Tapez sudo dmesg et tapez trois fois le mauvais mot de passe. Je veux ensuite que vous alliez voir / | ||
+ | |||
+ | Maintenant que vous avez fait vos premiers pas dans les fichiers journaux, n' | ||
+ | |||
+ | Nous avons abordé le « où » « où suis-je » et le « comment » « comment puis-je vérifier les erreurs ». Le « quand » vous êtes n'est pas important, mais si vous devez vraiment le savoir, tapez : date ;) | ||
+ | |||
+ | Comme toujours, si vous trouvez une erreur ou pensez que je vous ai aidé dans la mauvaise direction, veuillez nous le faire savoir à : misc@fullcirclemagazine.org |
issue213/tutoriel.1738433536.txt.gz · Dernière modification : 2025/02/01 19:12 de d52fr