Outils pour utilisateurs

Outils du site


issue213:tutoriel

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
issue213:tutoriel [2025/02/01 12:15] d52frissue213: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.
  
-Note: This is the first of a series of articles intended solely for individuals who, while having no experience in using Linuxare interested in the operating system and, more particularly, are looking to Linux as an alternative when Windows 10 reaches end of life in 2025.+Say you logged on to a friend’s computer and the prompt did not display the name of the computeryou could use the hostname command to get that informationright? But how would you get more informationlike the “about” page on Gnome, but from the command line?  Yep, the smarties among you got it immediately, hostnamectl. The nice thing about hostnamectl, is that you can immediately see if you are in a virtual machine or not (Chassis).**
  
 +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 d’adopter une approche plus pratique, donc je vous demanderais de garder vos émulateurs de terminaux ouverts et de suivre, juste pour faire travailler la mémoire musculaire. Maintenant, évidemment, je ne peux pas couvrir tout un livre ici, mais je pense au CPU, à la mémoire et au disque. Cela peut alors se lier à certaines des choses du LPI que nous couvrons ailleurs. Cela signifie qu’il y aura des devoirs, mais je serai bref.
  
-Windows 10 will reach end of life (EOL) on October 142025. Many existing users of Windows 10 will know that there is no upgrade path to Windows 11 for their specific computer due to some stringent hardware requirements that are being imposed by Microsoft. For examplesome reputable sources suggest that machines must be less than four years old in order to be upgraded! For most machines, an Intel 8th-generation Corean AMD Ryzen 2000 seriesor better chipis required as the central processing unit (CPU). Additionallya Trusted Platform Module (TPM) must be installed and enabledIf you are not sure if your computer can run Windows 11use Microsofts PC Health Check (https://support.microsoft.com/en-us/windows/how-to-use-the-pc-health-check-app-9c8abd9b-03ba-4e67-81ef-36f37caa7844software to determine your machine’s current status.+Supposons que vous vous êtes connecté à l’ordinateur d’un ami et que l’invite n’affiche pas le nom de l’ordinateurvous pouvez utiliser la commande hostname pour obtenir cette informationn’est-ce pas ? Mais comment obtenir plus d’informationscomme la page « à propos » de Gnomemais à partir de la ligne de commande ? Ouiles plus fûtés d’entre vous l’ont immédiatement comprishostnamectlL’avantage de hostnamectlcest que vous pouvez immédiatement voir si vous êtes dans une machine virtuelle ou non (Chassis).
  
-So, now you should know if your specific computer can or cannot run Windows 11. At the time of writing, there is no indication that Microsoft is going to relax the hardware requirements noted above. So, if your computer will not run Windows 11, the question becomes what are you going to do as of October 14th next year? 
  
-Firstlydo not panicYou have almost a whole year to get ready for the end-of-life of Windows 10. You can continue to use Windows 10 for the remaining months as you have in the pastYour computer will run as normal. System patches will continue to be supplied and installed through Windows Update over the entire time.+**You could see “desktop” or “laptop” on your machine insteadand if yours did say either, you would not see “Virtualization” We can see the operating system name, in my case Ubuntu 24.04, even though it is Lubuntu and my kernel version. If I wanted more information on the kernel, I would use: uname -a and I’d get a bit more, but not too much moreIf I really wanted more information about my CPU, I’d use cat /proc/cpuinfo | less and I’d get a decent info dump. Go ahead, try it quickly, I’ll wait…
  
-Howeverwhat you do need to do is think aheadWhen Windows 10 reaches EOL, there will be no further security patches and machines still running this operating system may be vulnerable to attackparticularly if they remain connected to the Internet.+Nowif I needed more information on my OS, I could try cat /etc/*-release and see the codename of my OS (sorry about the mistake, a girl with long, long legs and short shorts was mobile zombie-ing around in the coffee shop, but I’ll leave it there so you can see everyone makes mistakes.) Then there are the ls-commandslike lshw, or if we are talking CPU, lscpu, or even lsusb or lspci and so forth. My point is that there are lots of ways for you to find out more about a foreign (or your own!) computer.**
  
-Sowhat are the options? Clearlycontinuing to run Windows 10, with no further security patchesis highly undesirable since most of us rely heavily on having stable and secure Internet access on a daily basis. A second option may be to purchase extended support for Windows 10 from MicrosoftIt’s believed that the cost for this is going to be $30.00 for a single computer but this will be for only one year period. This option is therefore of limited value as the purchaser will be back to an EOL situation in October2026A more expensivebut more permanent solution, would be to purchase a new computer that will have Windows 11 installedHoweverthe most attractive option may well be to switch to using Linux as the main operating systemperhaps retaining the use of Windows in off-line mode in order to run specific applications that either won’t run under Linux or for which there is no satisfactory native Linux equivalent.+Vous pourriez voir « desktop » ou « laptop » sur votre machine à la placeet si la vôtre indiquait l’un ou l’autrevous ne verriez pas « Virtualization ». Nous pouvons voir le nom du système d’exploitationdans mon cas Ubuntu 24.04, même sil s’agit de Lubuntu et de ma version du noyauSi je voulais plus d’informations sur le noyau, j’utiliserais : uname -et j’en aurais un peu plusmais pas tropSi je voulais vraiment plus d’informations sur mon processeurj’utiliserais cat /proc/cpuinfo | less et j’obtiendrais un bon dump d’informationsAllez-yessayez vitej'attends...
  
-The latter option might well be attractive to many users who are (areluctant to abandon perfectly good hardwareor (b) unwilling or unable to bear the expense or purchasing new computer. Howevermany users are hesitant to consider this option because they have heard that Linux is “hard” or “only for geeks”. Nothing could be further from the truthand the good news is thatif you are willing to at least give the option a tryyou have an entire year to check things outSothis is the premise of this first article in a planned series that will act as a simple guide to the use of the Linux operating system.+Maintenant, si j'avais besoin de plus d'informations sur mon système d'exploitation, je pourrais essayer cat /etc/*-release et voir le nom de code de mon système d'exploitation (désolé pour l'erreur, une fille avec de très longues jambes et un short court faisait le zombie mobile dans le café, mais je vais la laisser là pour que vous puissiez voir que tout le monde fait des erreurs.Ensuiteil y les commandes lscomme lshwou si nous parlons de CPUlscpuou même lsusb ou lspci et ainsi de suiteCe que je veux direc'est qu'il existe de nombreuses façons d'en savoir plus sur un ordinateur étranger (ou le vôtre !).
  
-Specifically, we will initially download the Cinnamon edition of Linux Mint Version 22 (Wilma) and create a bootable USB drive that will enable us to run Linux without affecting Windows on our computer in any way. We’ll find that the Cinnamon desktop is very similar to that used by Windows 10, and that many useful applications are bundled with the Linux software. 
  
-This will give us the confidence to eventually install Linux side-by-side with Windows 10, giving us dual-boot capability where we can decide to use either Linux or Windows, with each operating system working completely independently of the otherTherewe will have the best of both worlds. We can try out all the features and possibilities of Linux while retaining the option to return to Windows by simply rebooting if and when necessary.+**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 memoryA favourite of the LPI exams is: uptimethough 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
  
-We will go through the process of thoroughly trying out Linux in manageable steps. After all, we have a whole year to see if Linux can be a viable replacementor at least a useful partnerfor our Windows 10 system. Solet’s get started.+Before I move onlet’s quickly look at what we covered in that short piece: 
 +•  hostnamehostnamectlunamelscpu, lshw, lspci, lsusb, df, free, uptime, htop, lolcat 
 +•  12 commands in 5 minutes; you are on a roll my friend!**
  
-Firstlywe need a USB drivewith a capacity of 4 GB or morewhich we can use to create a bootable disk. The disk should be emptyor at least not contain any files that are neededsince the process of creating the boot drive will overwrite any existing filesNow, go to the Linux Mint 22 "Wilma" page (https://linuxmint.com/download.php)Click on the Download button for the Cinnamon Edition and select the link to the Manitoba Unix User Group. This will download the file linuxmint-22-cinnamon-64bit.iso (2.91 GB) which we will use to create the bootable USB drive.+La plupart d'entre vous connaissent : df -h - pour voir les informations sur le niveau de remplissage - ou de vidage - de votre disque et : free -h - pour voir la même chose sur votre mémoire. L'un des favoris des examens LPI est : uptimebien que dans toute ma carrièreje n'ai jamais eu besoin de taper cette commande une seule fois dans le monde réel (!)nous avons juste tellement de meilleurs outilspar exempleje peux voir le temps de fonctionnement dans : htop - et généralement j'ai une forme de logiciel de surveillance installé pour avoir une meilleure vue de la charge au fil du tempsJ'aime le fait qu'il existe de nombreuses façons de dépecer un chat sous Linux ! Héhé, oui, je suppose que lolcat « dépècerait » la sortie de votre terminal... mais vous voyez ce que je veux dire.
  
-We can use Balena Etcher as a really simple way to create the bootable disk (see Etching a Bootable USB Drivehttps://opcug.ca/Reviews/BalenaEtcher.pdf). Download the Windows version of Balena Etcher from https://etcher.balena.io by scrolling down the page and clicking the Download link for ETCHER FOR WINDOWS (X86|X64) (INSTALLER).+Avant de continuer, regardons rapidement ce que nous avons couvert dans ce court article : 
 +••hostname, hostnamectl, uname, lscpu, lshw, lspci, lsusb, df, free, uptime, htop, lolcat 
 +••12 commandes en 5 minutes ; tu es sur la bonne voie mon ami !
  
-The downloaded file, balenaEtcher-1.19.21.Setup.exe, is a portable version of the software, so simply double-clicking on this exe file runs the program. Click on the Flash from file button in the main program window and select linuxmint-22-cinnamon-64bit.iso as the source file. Now, plug in the 4 GB (or bigger) USB drive and choose this drive using the Select target button. Finally, press the Flash button and wait for Etcher to complete the writing process. 
  
-We can now reboot the computer from the just-created bootable USB drive. The process required varies by computer. If you dont already know how to boot your specific machine from a USB drive, enter a query in Google or check the manufacturer’s web site. For my Dell laptop, simply have to press F12 as the machine is rebooting and a one-time boot menu pops up that allows me to select the USB drive.+**One way of finding out what you are dealing with, when troubleshooting, is the log file, or should I say logs, as there are quite a few. The main one Id like you to look at is: tail /var/log/syslog (I trust that you are familiar with head and tail?or you could peruse the whole thing: cat /var/log/syslog | less (will also assume you know more and less, as they are some of the first commands that one learns when using a terminal). Most of you should also be familiar with: dmesg  or if you did not use earlier versions of Ubuntu, it would be: sudo dmesg  - (it did not need sudo elevation before 20.04? not 100% on that, don’t quote me, but if you have old Ubuntu in a VM, say, Hardy Heron or whatever, you can just type dmesg.
  
-A boot menu (GNU GRUB version 2.12) will be displayed. The first menu item, ‘*Start Linux Mint 22 Cinnamon 64-bit (compatibility mode)’ is set as the default selection – as indicated by the asteriskPress the Enter key to boot into Linux Mint.+You should know that dmesg is not the only way to see what is/has happened during your bootYou could also look at the boot log: tail /var/log/boot.log  **
  
-Be patient as the boot process may take little timeNote that we are booting directly from the USB drive which is relatively slow. The process will involve black screens and the occasional green-and-white Linux Mint (lmlogobut the Linux desktop will eventually load in all its splendour! (as shown in Figure 1)+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 pas malLe principal que j'aimerais que vous regardiez est : tail /var/log/syslog (j'espère que vous connaissez head et tail ?ou vous pouvez parcourir le tout : cat /var/log/syslog | less (je supposerai également que vous connaissez more et lesscar ce sont certaines des premières commandes que l'on apprend lorsqu'on utilise un terminal). La plupart d'entre vous devraient également être familiers avec : dmesg - ou si vous n'avez pas utilisé de versions antérieures d'Ubuntu, ce serait : sudo dmesg - (il n'y avait pas besoin d'élévation sudo avant 20.04 ? Je ne suis pas sûr à 100 %, ne me citez pas, mais si vous avez un ancien Ubuntu dans une VM, disons Hardy Heron ou autre, vous pouvez simplement taper dmesg.)
  
-A notification window popped up briefly as the desktop loadedIf you missed it, the text indicated that “Wi-Fi networks are available”. As a first step in making use of our Linux desktop, we can make the Wi-Fi connection and try out the Firefox web browser that is bundled with Linux Mint.+Vous devez savoir que dmesg n'est pas le seul moyen de voir ce qui se passe/s'est passé pendant votre démarrageVous pouvez également consulter le journal de démarrage : tail /var/log/boot.log
  
-The lower portion of the Linux desktop is called the panel, and is equivalent to the Windows’ taskbar. At the right end of the panel there is a group of icons of which the fourth icon from the right (Figure 2) is for networking. Left-click on this icon to bring up a list of available network connections. Select the name of your home Wi-Fi network. 
  
-In the subsequent pop-up dialogue boxenter the password for your Wi-Fi system and press ConnectNow click on the orange Firefox icon in the group of icons at the left end of the panel (Figure 3)When Firefox loads, type opcug.ca in the address barYou are now browsing the Internet using Linux!+**Your homeworkerm, mission – should you choose to accept it – is:  
 +1To  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 usersOn some servers thoughthe logs may be sent off to a log server, so I would suggest doing this on your own desktop/laptop/VM. 
 +2. To type sudo dmesg and type the password wrong three timesI then want you to go and look at /var/log/auth.log  - we will talk about this in the next issue.
  
-Feel free to try any of the other applications that are available on your Linux desktop. (Hint – the Start menu is the lm icon in the lower-left corner of the desktop.Howeverwe will be exploring Linux in detail in upcoming articles in this series so you can also stay tuned for much more information on how to configure and use Linux.+Now that you have wet your footsies in logfiles, remember to actually go here (/var/logand have a look herenext time you get an error on the command line
  
-Bottom Line+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   ;)
  
-•  Linux Mint (Open source) +As always, should you find an error, or think I helped you in a wrong direction, please let us know onmisc@fullcirclemagazine.org**
-•  Version 22 (Wilma) +
-•  Clément Lefèbvre +
-•  https://linuxmint.com+
  
 +Votre devoir, euh, mission - si vous choisissez de l'accepter - est :
 +1. Regarder à l'intérieur du répertoire /var/log/ et fouiller dans certains de ces fichiers journaux. En particulier, je veux que vous vérifiiez les utilisateurs connectés avec la commande : w - puis que vous vérifiiez auth.log pour voir ces utilisateurs. Sur certains serveurs, les journaux peuvent être envoyés à un serveur de journaux, je vous suggère donc de le faire sur votre propre ordinateur de bureau/portable/VM.
 +2. Tapez sudo dmesg et tapez trois fois le mauvais mot de passe. Je veux ensuite que vous alliez voir /var/log/auth.log - nous en parlerons dans le prochain numéro.
  
 +Maintenant que vous avez fait vos premiers pas dans les fichiers journaux, n'oubliez pas d'aller ici (/var/log) et de jeter un œil ici, la prochaine fois que vous obtenez une erreur sur la ligne de commande.
 +
 +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.1738408540.txt.gz · Dernière modification : 2025/02/01 12:15 de d52fr