<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Archives des linux - La programmation sur le web</title>
	<atom:link href="https://programmation.surleweb-france.fr/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://programmation.surleweb-france.fr/tag/linux/</link>
	<description>La programmation gratuite pour tous</description>
	<lastBuildDate>Sun, 28 Aug 2022 15:01:20 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2023/08/cropped-19518430-icone-de-programmation-pour-votre-site-web-mobile-presentation-et-conception-de-logo-gratuit-vectoriel.jpg?fit=32%2C32&#038;ssl=1</url>
	<title>Archives des linux - La programmation sur le web</title>
	<link>https://programmation.surleweb-france.fr/tag/linux/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">176210735</site>	<item>
		<title>Windows, une interface graphique pour Linux</title>
		<link>https://programmation.surleweb-france.fr/windows-une-interface-graphique-pour-linux/</link>
					<comments>https://programmation.surleweb-france.fr/windows-une-interface-graphique-pour-linux/#respond</comments>
		
		<dc:creator><![CDATA[Zigomato]]></dc:creator>
		<pubDate>Sun, 28 Aug 2022 15:01:20 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[wsl]]></category>
		<guid isPermaLink="false">https://programmation.surleweb-france.fr/?p=1483</guid>

					<description><![CDATA[<p>Voici comment mettre en place une interface graphique pour son WSL, Windows Subsystem Linux</p>
<p class="continue-reading-button"> <a class="continue-reading-link" href="https://programmation.surleweb-france.fr/windows-une-interface-graphique-pour-linux/">Continuer la lecture<i class="crycon-right-dir"></i></a></p>
<p>L’article <a href="https://programmation.surleweb-france.fr/windows-une-interface-graphique-pour-linux/">Windows, une interface graphique pour Linux</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Depuis maintenant plusieurs années, <a href="https://docs.microsoft.com/fr-fr/windows/wsl/about" target="_blank" rel="noreferrer noopener">WSL pour Windows Subsystem Linux</a> permet d&rsquo;avoir une distribution Linux sur son poste Windows.</p>



<p>Mes pc sont quasiment tous sur Windows mais très fréquemment, j&rsquo;ai besoin d&rsquo;outils seulement disponibles sur Linux (principalement Ubuntu) ou bien les choses que je cherche à faire son plus simple dessus.</p>



<p>WSL a été pour moi une grande nouvelle. Plus besoin de passer par un autre poste pour faire deux ou trois tests. Maintenant, tout est accessible depuis Windows. Enfin, tout si je n&rsquo;ai seulement besoin de Ubuntu en ligne de commande.</p>



<p>Nous allons voir comment obtenir une interface graphique de WSL.</p>



<h2 class="wp-block-heading">Installation de WSL</h2>



<p>J&rsquo;imagine que si tu souhaites avoir une interface graphique, cela signifie que tu as déjà l&rsquo;installation qui a été faite et que ton système Linux est accessible en ligne de commande, sinon, je t&rsquo;invite à suivre l&rsquo;<a href="https://lecrabeinfo.net/installer-wsl-windows-subsystem-for-linux-sur-windows-10.html" target="_blank" rel="noreferrer noopener">installation sur cette page</a>.</p>



<h2 class="wp-block-heading">Mise à jour de WSL</h2>



<p>Une fois ton installation finalisée avec un utilisateur et son mot de passe. Commences par une petite mise à jour : </p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo apt-get update &amp;&amp; Sudo apt-get full-upgrade -y</pre>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="900" height="395" src="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-11.png?resize=900%2C395&#038;ssl=1" alt="" class="wp-image-1484" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-11.png?w=914&amp;ssl=1 914w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-11.png?resize=300%2C132&amp;ssl=1 300w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-11.png?resize=768%2C337&amp;ssl=1 768w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-11.png?resize=150%2C66&amp;ssl=1 150w" sizes="(max-width: 900px) 100vw, 900px" /><figcaption>Mise à jour en cours</figcaption></figure>
</div>


<h2 class="wp-block-heading">Installer un serveur X</h2>



<p>Commencer par installer un logiciel comme VcXsrv (ou similaire), tu peux le trouver ici en <a href="https://sourceforge.net/projects/vcxsrv/" target="_blank" rel="noreferrer noopener">téléchargement</a>.</p>



<p>Une fois installer, ouvrir l&rsquo;outil, tu auras le choix entre plusieurs fenêtrages :</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" decoding="async" width="498" height="392" src="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-12.png?resize=498%2C392&#038;ssl=1" alt="" class="wp-image-1485" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-12.png?w=498&amp;ssl=1 498w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-12.png?resize=300%2C236&amp;ssl=1 300w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-12.png?resize=150%2C118&amp;ssl=1 150w" sizes="(max-width: 498px) 100vw, 498px" /></figure>
</div>


<p><strong>Multiple windows</strong> permettra de voir le système LInux dans différentes fenêtre, <strong>One large windows</strong>, dans une grande.</p>



<p>Une fois le serveur lancé, un beau fond noir, oui, pour l&rsquo;instant, nous n&rsquo;avons pas encore d&rsquo;interface à afficher.</p>



<h3 class="wp-block-heading">Quelle version de WSL ?</h3>



<p>En fonction de votre système Windows, il se peut qu&rsquo;un ajout doit être fait.</p>



<p>Dans le Powershell, vérifies ta version WSL : </p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">wsl -l -v</pre>



<p>Pour ma part, je suis en version 1 :</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" decoding="async" width="287" height="72" src="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-13.png?resize=287%2C72&#038;ssl=1" alt="" class="wp-image-1486" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-13.png?w=287&amp;ssl=1 287w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-13.png?resize=150%2C38&amp;ssl=1 150w" sizes="(max-width: 287px) 100vw, 287px" /></figure>
</div>


<p>Tu peux tenter une mise à jour de la version en faisant (modifies le nom de la distribution en fonction de la tienne) :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">wsl --set-version Ubuntu 2</pre>



<p>Malheureusement, mon PC ne me le permet pas. Nous allons modifier un fichier dans WSL.</p>



<p>Modifies le fichier <strong>/etc/bash.bashrc</strong> en ajoutant à la fin : </p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">export DISPLAY=:0</pre>



<p>Puis redémarres WSL.</p>



<h2 class="wp-block-heading">Test de l&rsquo;affichage</h2>



<p>Nous allons tester le fonctionnement de notre serveur. Assures toi que ton serveur a bien été lancé et qu&rsquo;il a un beau fond noir</p>



<p>Commences par installer sur WSL cet éditeur :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo apt-get install vim-gtk</pre>



<p>Puis dans wsl, tapes :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">gvim</pre>



<p>A présent, tu dois avoir l&rsquo;éditeur qui s&rsquo;est lancé dans ta fenêtre de ton serveur :</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="900" height="551" src="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-14.png?resize=900%2C551&#038;ssl=1" alt="" class="wp-image-1487" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-14.png?w=1016&amp;ssl=1 1016w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-14.png?resize=300%2C184&amp;ssl=1 300w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-14.png?resize=768%2C470&amp;ssl=1 768w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-14.png?resize=150%2C92&amp;ssl=1 150w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-14.png?resize=327%2C201&amp;ssl=1 327w" sizes="auto, (max-width: 900px) 100vw, 900px" /></figure>
</div>


<h2 class="wp-block-heading">Installation d&rsquo;une interface graphique</h2>



<p>Bon, un fond noir, ce n&rsquo;est pas top, on va installer une interface graphique, on va reprendre celle de gnome.</p>



<p>Dans WSL, faites un petit :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo apt-get install xfec4</pre>



<p>Une fois l&rsquo;installation finie (cela peut prendre beaucoup de temps), toujours dans WSL, tapes :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">xfec4-session</pre>



<p>Tu devrais obtenir ceci :</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="900" height="506" src="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-15.png?resize=900%2C506&#038;ssl=1" alt="" class="wp-image-1492" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-15.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-15.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-15.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-15.png?resize=150%2C84&amp;ssl=1 150w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2022/08/image-15.png?w=1366&amp;ssl=1 1366w" sizes="auto, (max-width: 900px) 100vw, 900px" /></figure>
</div>


<h2 class="wp-block-heading">Conclusion</h2>



<p>Te voilà avec un petit système sous linux disposant d&rsquo;une interface graphique.</p>
<p>L’article <a href="https://programmation.surleweb-france.fr/windows-une-interface-graphique-pour-linux/">Windows, une interface graphique pour Linux</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://programmation.surleweb-france.fr/windows-une-interface-graphique-pour-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1483</post-id>	</item>
		<item>
		<title>PHP, réaliser un script multilingue</title>
		<link>https://programmation.surleweb-france.fr/php-realiser-un-script-multilingue/</link>
					<comments>https://programmation.surleweb-france.fr/php-realiser-un-script-multilingue/#respond</comments>
		
		<dc:creator><![CDATA[Zigomato]]></dc:creator>
		<pubDate>Mon, 10 May 2021 06:00:00 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[gettext]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[multilingue]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[traduction]]></category>
		<guid isPermaLink="false">https://programmation.surleweb-france.fr/?p=960</guid>

					<description><![CDATA[<p>Création d'un script en PHP multilingue en utilisant le module gettext, développé sous un environnement Linux</p>
<p class="continue-reading-button"> <a class="continue-reading-link" href="https://programmation.surleweb-france.fr/php-realiser-un-script-multilingue/">Continuer la lecture<i class="crycon-right-dir"></i></a></p>
<p>L’article <a href="https://programmation.surleweb-france.fr/php-realiser-un-script-multilingue/">PHP, réaliser un script multilingue</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>PHP et Python étant les deux langages que je connais le mieux, dans la lignée de la réalisation d&rsquo;un application Python en multilingue (disponible <a href="https://programmation.surleweb-france.fr/python-creer-des-traductions-pour-son-application/" target="_blank" rel="noreferrer noopener">ici</a>), nous allons voir rapidement la même procédure mais en PHP.</p>



<p>Nous allons utiliser xgettext qui fonctionne sensiblement de la même manière.</p>



<p>Tout d&rsquo;abord, les différents dossiers, un par langue, dans mon cas, l&rsquo;anglais et le français :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mkdir -p locales/fr/LC_MESSAGES
mkdir -p locales/en/LC_MESSAGES
mkdir src</pre>



<p>Maintenant le fichier <strong><em>main.php</em></strong> qui sera enregistré dans le dossier <strong><em>src</em></strong>, je mets l&rsquo;ensemble y compris l&rsquo;exemple sur la pluralité :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="php" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;?php
// Mise en place de la langue pour le script
setlocale(LC_ALL, "en_US.utf8");
// Définition du domaine pour la traduction
bindtextdomain("main", "locales");
// Sélection du domaine de texte
textdomain("main");

function print_some_strings(){
        echo _("Bonjour le monde\n");
        echo _("Ceci est une phrase traduite\n");
}

function print_some_plural_strings($num){
        $message1 = ngettext("%d homme", "%d hommes",$num);
        $message2 = ngettext("Je possede %d portables", "Je possede %d portables",$num);

        printf($message1."\n", $num);
        printf($message2."\n", $num);
}

print_some_strings();
print_some_plural_strings(1);
print_some_plural_strings(5);

?></pre>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Dans notre script (par exemple une page web), il faudra venir modifier le paramètre « en_US.utf8 » en fonction soit du choix de l&rsquo;utilisateur, soit de la langue du navigateur.</p></blockquote>



<p>Pour générer le template (<strong><em>.pot</em></strong>) :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">xgettext --add-comments src/main.php -o locales/main.pot</pre>



<p>Une fois le template créé, nous allons créer les fichiers de traduction (.po) :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">msginit -l en -i locales/main.pot -o locales/en/LC_MESSAGES/main.po
msginit -l fr -i locales/main.pot -o locales/fr/LC_MESSAGES/main.po</pre>



<p>Les traductions seront à mettre dans les fichiers <strong><em>.po</em></strong>.</p>



<p>Une fois les traductions inscrites dans le marbre, il nous reste à générer le fichier compréhensible par le script :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">msgfmt locales/fr/LC_MESSAGES/main.po -o locales/fr/LC_MESSAGES/main.mo
msgfmt locales/en/LC_MESSAGES/main.po -o locales/en/LC_MESSAGES/main.mo</pre>



<p>Une fois cela fait, quand tu lances ton script, tu vois bien ta traduction.</p>



<p>Pour la mise à jour, on regénère le template :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">xgettext --add-comments src/main.php -o locales/main.pot</pre>



<p>Cette fois-ci, on vient fusionner avec le fichier <strong><em>.mo</em></strong> existant (pour ne pas perdre ce qui a déjà été traduit :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">msgmerge --update locales/en/LC_MESSAGES/main.po locales/main.pot
msgmerge --update locales/en/LC_MESSAGES/main.po locales/main.pot</pre>



<p>On mets à jours les traductions et on finit par : </p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">msgfmt locales/fr/LC_MESSAGES/main.po -o locales/fr/LC_MESSAGES/main.mo
msgfmt locales/en/LC_MESSAGES/main.po -o locales/en/LC_MESSAGES/main.mo</pre>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Que ce soit en Python ou PHP, la mise en place de traduction pour son script est très accessible.</p>
<p>L’article <a href="https://programmation.surleweb-france.fr/php-realiser-un-script-multilingue/">PHP, réaliser un script multilingue</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://programmation.surleweb-france.fr/php-realiser-un-script-multilingue/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">960</post-id>	</item>
		<item>
		<title>Informations sur le temps d&#8217;une tâche</title>
		<link>https://programmation.surleweb-france.fr/informations-sur-le-temps-dune-tache/</link>
					<comments>https://programmation.surleweb-france.fr/informations-sur-le-temps-dune-tache/#respond</comments>
		
		<dc:creator><![CDATA[Zigomato]]></dc:creator>
		<pubDate>Fri, 19 Mar 2021 17:24:23 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Raspberry]]></category>
		<category><![CDATA[commande]]></category>
		<category><![CDATA[durée]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pv]]></category>
		<category><![CDATA[raspberry]]></category>
		<category><![CDATA[tâche]]></category>
		<category><![CDATA[temps]]></category>
		<guid isPermaLink="false">https://programmation.surleweb-france.fr/?p=823</guid>

					<description><![CDATA[<p>Ce paquet est PV pour Pipe Viewer, Il peut être inséré dans n'importe quel pipe normal, entre deux processus pour donner une indication visuelle de la rapidité avec laquelle les données transitent..</p>
<p class="continue-reading-button"> <a class="continue-reading-link" href="https://programmation.surleweb-france.fr/informations-sur-le-temps-dune-tache/">Continuer la lecture<i class="crycon-right-dir"></i></a></p>
<p>L’article <a href="https://programmation.surleweb-france.fr/informations-sur-le-temps-dune-tache/">Informations sur le temps d&rsquo;une tâche</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Voici un petit paquet pouvant être utile afin d&rsquo;avoir des informations sur l&rsquo;exécution du tâche lancée dans le terminal.</p>



<p>Ce paquet est PV pour Pipe Viewer, Il peut être inséré dans n&rsquo;importe quel pipe normal, entre deux processus pour donner une indication visuelle de la rapidité avec laquelle les données transitent..</p>



<h2 class="wp-block-heading">Installation du paquet</h2>



<p>Pour l&rsquo;installer, rien de plus simple, à partir du terminal (sur un debian ou dérivé) :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo apt-get install pv</pre>



<p>L&rsquo;installation ne prend que quelques secondes.</p>



<h2 class="wp-block-heading">Utilisation de PV</h2>



<p>Utilisation : pv [OPTIONS] [FICHIER]&#8230;<br>Concatène FICHIER(s), ou l&rsquo;entrée standard, sur la sortie standard<br>avec monitorage.<br>De manière simple, c&rsquo;est équivalent à la commande <strong>cat</strong> avec une barre de progression<br>-p, &#8211;progress affiche la barre de progression<br>-t, &#8211;timer affiche le temps écoulé<br>-e, &#8211;eta affiche l&rsquo;heure approximative de l&rsquo;achèvement de<br>la tâche<br>-r, &#8211;rate affiche le taux de tranfert des données<br>-a, &#8211;average-rate show data transfer average rate counter<br>-b, &#8211;bytes affiche le nombre d&rsquo;octets transférés<br>-f, &#8211;force imprime vers la sortie d&rsquo;erreur même si ce n&rsquo;est<br>pas un terminal<br>-n, &#8211;numeric imprime en pourcentage, pas les informations<br>visuelles<br>-q, &#8211;quiet n&rsquo;afficher aucune information de transfert<br>-c, &#8211;cursor utiliser les séquences d&rsquo;échappements de<br>positionnement de curseur<br>-W, &#8211;wait ne rien afficher avant qu&rsquo;au moins un octet soit<br>tranféré<br>-s, &#8211;size TAILLE ajuste la taille estimée des données à TAILLE<br>octets<br>-l, &#8211;line-mode compte les lignes au lieu des octets<br>-i, &#8211;interval SEC mise-à-jour toute les SEC secondes<br>-w, &#8211;width LARGEUR présumer la largeur du terminal à LARGEUR<br>caractères<br>-H, &#8211;height HAUTEUR présumer la hauteur du terminal à HAUTEUR lignes<br>-N, &#8211;name NOM préfixer les informations visuelles avec NOM<br>-L, &#8211;rate-limit TAUX limite le taux de transfer à TAUX octets par<br>seconde<br>-B, &#8211;buffer-size OCTETS Utiliser une mémoire tampon de OCTETS octets<br>-R, &#8211;remote PID mettre-à-jour la configuration du processus PID<br>-h, &#8211;help afficher cette aide puis quitter<br>-V, &#8211;version afficher la version puis quitter</p>



<h2 class="wp-block-heading">Exemple d&rsquo;utilisation</h2>



<h3 class="wp-block-heading">Création d’une clé bootable</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pv image.iso | dd of=/dev/sdb &amp;&amp; sync</pre>



<p>Qui rendra : </p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">1,46GiO 0:00:17 [  86MiB/s] [==============================================================================>] 100%            
3062144+0 enregistrements lus
3062144+0 enregistrements écrits
1567817728 bytes (1,6 GB, 1,5 GiB) copied, 13,8749 s, 113 MB/s</pre>



<h3 class="wp-block-heading">Sauvegarde d’une base de données MariaDB</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mysqldump mybdd | pv > mybdd.sql</pre>



<h3 class="wp-block-heading">Création d’une archive</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -czf - dossier | pv > dossier.tar.gz</pre>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Voici un petit utilitaire qui même si il ne va pas te révolutionner la vie, te donnera une petite idée sur ce qui est en train de se passer</p>
<p>L’article <a href="https://programmation.surleweb-france.fr/informations-sur-le-temps-dune-tache/">Informations sur le temps d&rsquo;une tâche</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://programmation.surleweb-france.fr/informations-sur-le-temps-dune-tache/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">823</post-id>	</item>
		<item>
		<title>Linux, exécuter un script en admin</title>
		<link>https://programmation.surleweb-france.fr/linux-executer-un-script-en-admin/</link>
					<comments>https://programmation.surleweb-france.fr/linux-executer-un-script-en-admin/#respond</comments>
		
		<dc:creator><![CDATA[Zigomato]]></dc:creator>
		<pubDate>Mon, 18 May 2020 17:00:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[Raspberry]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[visudo]]></category>
		<guid isPermaLink="false">https://programmation.surleweb-france.fr/?p=392</guid>

					<description><![CDATA[<p>Méthode simple pour donner des droits root à un script</p>
<p class="continue-reading-button"> <a class="continue-reading-link" href="https://programmation.surleweb-france.fr/linux-executer-un-script-en-admin/">Continuer la lecture<i class="crycon-right-dir"></i></a></p>
<p>L’article <a href="https://programmation.surleweb-france.fr/linux-executer-un-script-en-admin/">Linux, exécuter un script en admin</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>J&rsquo;ai eu besoin d&rsquo;automatiser un script en bash unix sur mon Raspberry. Dans ce script, une des commandes nécessite les droits admin, en l’occurrence, mon script devait relancer le <a rel="noreferrer noopener" href="https://programmation.surleweb-france.fr/installer-serveur-web-complet/" target="_blank">serveur HTTP Apache</a> (<strong>sudo service apache2 restart</strong>).</p>



<p>Le but de ce script est de redémarrer le service, j&rsquo;ai constaté que mon site retourné une réponse vide. Malheureusement, je n&rsquo;arrive pas à trouver la cause, la solution temporaire est donc de vérifier l&rsquo;accessibilité du site et en cas d&rsquo;erreur, je redémarre le service.</p>



<p>Pour l&rsquo;automatisation, j&rsquo;utilise le <a rel="noreferrer noopener" href="https://doc.ubuntu-fr.org/cron" target="_blank">cron</a>.</p>



<h2 class="wp-block-heading">Donner le droit admin au script</h2>



<p>Une fois que ton script est créé et qu&rsquo;il est fonctionnel, par exemple <strong>/home/chez_moi/test_sudo.sh</strong>. Je ne prends pas volontairement un script.</p>



<p>Dans un terminal, entres :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo visudo</pre>



<p>Puis sur le modèle :</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">#Cmnd alias specification
Cmnd_Alias REF_SCRIPT=/home/chez_moi/test_sudo.sh</pre>



<p>Et à la fin du fichier, ajoutes :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">%root ALL=(ALL) NOPASSWD:REF_SCRIPT</pre>
</div></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>le %root peut être à remplacer par %admin, REF_SCRIPT est une référence que tu choisis. </p><p>La syntaxe « Cmnd_Alias » est importante.</p><cite>Zigomato</cite></blockquote>



<p>Tu enregistres et tu sors.</p>



<h2 class="wp-block-heading">Automatiser avec le cron</h2>



<p>Je ne ferai pas de cours sur le cron, je vais juste te montrer comment ajouter ton script test, dans un terminal, saisis :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo crontab -e</pre>



<p>Puis à la fin du fichier, ajoutes :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">*/30 * * * * bash /home/chez_moi/test_sudo.sh</pre>



<p>Une fois que tu fermes, tout est bien pris en compte.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Voilà la petite astuce pour donner les droits à un seul script sans passer par des utilisateurs.</p>



<p class="has-small-font-size">A été vu sur <a rel="noreferrer noopener" href="https://forum.ubuntu-fr.org/viewtopic.php?id=358786" target="_blank">forum.ubuntu-fr.org</a> et sur <a href="https://linux-attitude.fr/post/utilisation-de-sudo" target="_blank" rel="noreferrer noopener">Linux-attitude.fr</a>.</p>
<p>L’article <a href="https://programmation.surleweb-france.fr/linux-executer-un-script-en-admin/">Linux, exécuter un script en admin</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://programmation.surleweb-france.fr/linux-executer-un-script-en-admin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">392</post-id>	</item>
		<item>
		<title>Raspberry Pi &#8211; Connexion SSH</title>
		<link>https://programmation.surleweb-france.fr/raspberry-pi-connexion-ssh/</link>
					<comments>https://programmation.surleweb-france.fr/raspberry-pi-connexion-ssh/#respond</comments>
		
		<dc:creator><![CDATA[Zigomato]]></dc:creator>
		<pubDate>Sun, 17 May 2020 17:00:00 +0000</pubDate>
				<category><![CDATA[Programmation]]></category>
		<category><![CDATA[Raspberry]]></category>
		<category><![CDATA[distance]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pi]]></category>
		<category><![CDATA[raspberry]]></category>
		<category><![CDATA[raspi-config]]></category>
		<category><![CDATA[réseau]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wpa_supplicant]]></category>
		<guid isPermaLink="false">https://programmation.surleweb-france.fr/?p=320</guid>

					<description><![CDATA[<p>Mettre en place une connexion SSH sur votre Raspberry en quelques minutes est très rapide soit par raspi-config soit à  la préparation de la carte SD</p>
<p class="continue-reading-button"> <a class="continue-reading-link" href="https://programmation.surleweb-france.fr/raspberry-pi-connexion-ssh/">Continuer la lecture<i class="crycon-right-dir"></i></a></p>
<p>L’article <a href="https://programmation.surleweb-france.fr/raspberry-pi-connexion-ssh/">Raspberry Pi &#8211; Connexion SSH</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Le format et les performances du Raspberry PI 4 en font un candidat parfait pour se monter un serveur personnel que ce soit pour un usage local que pour une mise en ligne d&rsquo;un petit site web.</p>



<p>Le contrôle du Raspberry peut se faire graphiquement mais il peut être très utile de mettre une connexion à distance.</p>



<p>Tu verras dans cette page comment activer la connexion SSH sur Raspberry avec deux méthodes différentes.</p>



<h2 class="wp-block-heading">Qu&rsquo;est-ce-que le SSH ?</h2>



<p>Le SSH (pour Secure Shell) est à la fois un protocole de communication et un ensembles d&rsquo;utilitaire. </p>



<p>Ce protocole et ses utilitaires permettent de mettre en place une connexion sécurisée et cryptée avec des clés publiques. </p>



<p>Il n&rsquo;existe pas de failles connues du SSH cependant, les problèmes de sécurité peuvent apparaître à cause de la rotation des clés ou directement du Bash.</p>



<p>Tout les systèmes Linux inclus ce protocole par défaut. En revanche pour Windows, le client SSH peut être activer (voir <a rel="noreferrer noopener" href="https://www.pcastuces.com/pratique/astuces/5235.htm" target="_blank">cette page</a>), quant à l&rsquo;installation d&rsquo;un serveur ssh sur windows, voici comment l&rsquo;activer/l&rsquo;installer, <a rel="noreferrer noopener" href="http://www.kevinsubileau.fr/informatique/astuces-tutoriels/windows-10-client-serveur-ssh-natif.html" target="_blank">lien</a>).</p>



<h2 class="wp-block-heading">Mettre en place le SSH sur ton Raspberry Pi</h2>



<p>Tu verras deux manières :</p>



<ul class="wp-block-list"><li>pendant la préparation de la carte SD</li><li>une fois le Raspberry démarré</li></ul>



<h3 class="wp-block-heading">Installation lors de la préparation de la carte</h3>



<p>Si tu compte utiliser ton Raspberry Pi sans écran ni clavier, c&rsquo;est tout à fait possible, en revanche, il va falloir que tu prévois cela dès le début.</p>



<p>Une fois que tu as créé ta carte SD (par exemple en suivant cette <a rel="noreferrer noopener" href="https://programmation.surleweb-france.fr/pi-imager-installation-facile-raspbian/" target="_blank">article</a>), tu remets ta carte SD dans ton lecteur.</p>



<p>Dans la partition <strong>boot</strong> (accessible même depuis Windows), tu rajoutes un fichier nommé « <strong>ssh</strong> » vide et sans extension :</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="658" height="279" src="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/activer-ssh-sur-carte-SD.png?resize=658%2C279&#038;ssl=1" alt="activer ssh sur carte SD" class="wp-image-369" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/activer-ssh-sur-carte-SD.png?w=658&amp;ssl=1 658w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/activer-ssh-sur-carte-SD.png?resize=300%2C127&amp;ssl=1 300w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/activer-ssh-sur-carte-SD.png?resize=150%2C64&amp;ssl=1 150w" sizes="auto, (max-width: 658px) 100vw, 658px" /><figcaption>activer ssh sur carte SD</figcaption></figure></div>



<h4 class="wp-block-heading">Raspberry branché à la box en filaire</h4>



<p>Le premier démarrage prendra un petit peu de temps. Si ton Raspberry est relié à la box internet en filaire, une adresse <a href="https://fr.wikipedia.org/wiki/Adresse_IP" target="_blank" rel="noreferrer noopener">ip </a>lui sera attribuée, pour la connaître, rends toi sur la page de ta box, l&rsquo;accès se fera à partir d&rsquo;une adresse différente en fonction de ta box.</p>



<p>Tu vas voir dans les périphériques connectés, l&rsquo;un d&rsquo;eux correspond à ton Raspberry.</p>



<p>Pour te connecter, le login par défaut est « pi » et le mot de passe par défaut est « raspberry ».</p>



<h4 class="wp-block-heading">Raspberry en connexion Wifi</h4>



<p>Je t&rsquo;invite à suivre l&rsquo;article que j&rsquo;ai fait sur la configuration du wifi sur le raspberry pi <a rel="noreferrer noopener" href="https://programmation.surleweb-france.fr/raspberry-activer-le-wifi/(ouvre un nouvel onglet)" target="_blank">ici</a>.</p>



<p>De la même manière qu&rsquo;en filaire, tu dois passer par la page de configuration de ta box pour retrouver l&rsquo;adresse IP.</p>



<h3 class="wp-block-heading">Activation avec raspi-config</h3>



<p>Si ton Raspberry est déjà en route, tu peux facilement activer le SSH, dans un terminal, saisie :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo raspi-config</pre>



<div class="wp-block-image"><figure class="aligncenter size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="645" height="389" src="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/raspi-config-accueil.png?resize=645%2C389&#038;ssl=1" alt="accueil du raspi-config" class="wp-image-373" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/raspi-config-accueil.png?w=645&amp;ssl=1 645w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/raspi-config-accueil.png?resize=300%2C181&amp;ssl=1 300w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/raspi-config-accueil.png?resize=150%2C90&amp;ssl=1 150w" sizes="auto, (max-width: 645px) 100vw, 645px" /><figcaption>accueil du raspi-config</figcaption></figure></div>



<p>Ensuite, choisis « <strong>Interfacing Options</strong> » :</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="642" height="387" src="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/raspi-config-options-interfacing.png?resize=642%2C387&#038;ssl=1" alt="Raspi-config iptions interfacing" class="wp-image-374" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/raspi-config-options-interfacing.png?w=642&amp;ssl=1 642w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/raspi-config-options-interfacing.png?resize=300%2C181&amp;ssl=1 300w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/raspi-config-options-interfacing.png?resize=150%2C90&amp;ssl=1 150w" sizes="auto, (max-width: 642px) 100vw, 642px" /><figcaption>Raspi-config iptions interfacing</figcaption></figure></div>



<p>Sélectionner SSH et activer la fonction. Un redémarrage sera nécessaire.</p>



<p>Pour obtenir, l&rsquo;adresse IP, tu peux te référer au chapitre précédent.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Ton Raspberry est maintenant accessible via SSH.</p>
<p>L’article <a href="https://programmation.surleweb-france.fr/raspberry-pi-connexion-ssh/">Raspberry Pi &#8211; Connexion SSH</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://programmation.surleweb-france.fr/raspberry-pi-connexion-ssh/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">320</post-id>	</item>
		<item>
		<title>Pi Imager et l&#8217;installation facile de Raspbian</title>
		<link>https://programmation.surleweb-france.fr/pi-imager-installation-facile-raspbian/</link>
					<comments>https://programmation.surleweb-france.fr/pi-imager-installation-facile-raspbian/#respond</comments>
		
		<dc:creator><![CDATA[Zigomato]]></dc:creator>
		<pubDate>Sun, 10 May 2020 17:00:00 +0000</pubDate>
				<category><![CDATA[Programmation]]></category>
		<category><![CDATA[Raspberry]]></category>
		<category><![CDATA[carte sd]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pi]]></category>
		<category><![CDATA[raspberry]]></category>
		<category><![CDATA[raspbian]]></category>
		<guid isPermaLink="false">https://programmation.surleweb-france.fr/?p=209</guid>

					<description><![CDATA[<p>Création d'une carte SD pour le Raspberry pi avec l'outil officiel de la fondation Raspberry</p>
<p class="continue-reading-button"> <a class="continue-reading-link" href="https://programmation.surleweb-france.fr/pi-imager-installation-facile-raspbian/">Continuer la lecture<i class="crycon-right-dir"></i></a></p>
<p>L’article <a href="https://programmation.surleweb-france.fr/pi-imager-installation-facile-raspbian/">Pi Imager et l&rsquo;installation facile de Raspbian</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-image"><figure class="aligncenter size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="800" height="450" src="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/Raspberry-Pi-Logo.jpg?resize=800%2C450&#038;ssl=1" alt="" class="wp-image-354" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/Raspberry-Pi-Logo.jpg?w=800&amp;ssl=1 800w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/Raspberry-Pi-Logo.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/Raspberry-Pi-Logo.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/Raspberry-Pi-Logo.jpg?resize=150%2C84&amp;ssl=1 150w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure></div>



<p>Préparer une carte pour votre Raspberry Pi n&rsquo;aura jamais été facile.</p>



<p>Si tu recherches, une installation simple sans dual-boot pour une utilisation immédiate de Raspbian sur le Raspberry,les lignes qui suivent vont te réjouir.</p>



<p>La fondation <a rel="noreferrer noopener" href="https://www.raspberrypi.org/" target="_blank">Raspberry</a> a développé un une petite application disponible pour Windows, Ubuntu et MacOs qui te permettra en quelques clics de préparer et d&rsquo;installer Raspbian sur ta carte SD.</p>



<h2 class="wp-block-heading">Téléchargement de Pi Imager</h2>



<p>Rien de plus simple pour le téléchargement, tu te rends sur la <a rel="noreferrer noopener" href="https://www.raspberrypi.org/downloads/" target="_blank">page de la fondation</a>, puis tu sélectionnes la version pour ton système d&rsquo;exploitation :</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="395" src="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/pi-imager.png?resize=708%2C395&#038;ssl=1" alt="Choix du système d'exploitation" class="wp-image-357" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/pi-imager.png?w=708&amp;ssl=1 708w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/pi-imager.png?resize=300%2C167&amp;ssl=1 300w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/pi-imager.png?resize=150%2C84&amp;ssl=1 150w" sizes="auto, (max-width: 708px) 100vw, 708px" /><figcaption>Choix du système d&rsquo;exploitation</figcaption></figure></div>



<p>Le fichier fait 19Mo pour Windows. Tu exécutes le fichier télécharger et suis les consignes.</p>



<h2 class="wp-block-heading">Utilisation de Pi Imager</h2>



<p>Une fois lancé, tu devras simplement :</p>



<ul class="wp-block-list"><li>Choisir le système que tu veux installer</li><li>Sélectionner la carte SD</li><li>Lancer l&rsquo;écriture</li></ul>



<h3 class="wp-block-heading">Choisir le système</h3>



<p>Tu pourras choisir un système :</p>



<ul class="wp-block-list"><li>Raspbian avec le bureau qui est recommandé</li><li>Les autres distribution de Raspbian, celle avec le bureau et la version légère</li><li>LibreElec qui est un système pour transformer ton Pi en poste multimédia</li><li>Ubuntu spécial Raspberry</li><li>Un système comprenant des utilitaires</li><li>Formater ta carte SD en Fat32, simplement.</li><li>Installer une image de ton choix mais tu es limité avec les extensions .img, .zip, .gz et .xy. Ce qui te laisse tout de même le choix.</li></ul>



<p>Seul le choix d&rsquo;installation d&rsquo;une distribution personnalisée nécessitera que tu télécharge avant l&rsquo;image.</p>



<p>Tous les autres choix ne te demandera aucun téléchargement en amont.</p>



<p>Une fois le système choisi ainsi que la carte, il suffit de cliquer sur « <strong>Write</strong> » et la création de la carte commence :</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="683" height="451" src="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/pi-imager-ecriture.png?resize=683%2C451&#038;ssl=1" alt="Ecriture de l'image sur la carte SD - Pi imager" class="wp-image-359" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/pi-imager-ecriture.png?w=683&amp;ssl=1 683w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/pi-imager-ecriture.png?resize=300%2C198&amp;ssl=1 300w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2020/05/pi-imager-ecriture.png?resize=150%2C99&amp;ssl=1 150w" sizes="auto, (max-width: 683px) 100vw, 683px" /><figcaption>Ecriture de l&rsquo;image sur la carte SD &#8211; Pi imager</figcaption></figure></div>



<p>Une fois terminé, votre carte est prête à être insérée dans le Raspberry Pi</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Dorénavant en quelques clics, tu peux préparer une carte pour ton Pi.</p>
<p>L’article <a href="https://programmation.surleweb-france.fr/pi-imager-installation-facile-raspbian/">Pi Imager et l&rsquo;installation facile de Raspbian</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://programmation.surleweb-france.fr/pi-imager-installation-facile-raspbian/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">209</post-id>	</item>
	</channel>
</rss>
