Serveur d'impression

Guide du didacticiel Linux Basics pour les débutants – Serveur d’impression

Par Titanfall , le 11 juin 2019 - 85 minutes de lecture


Fondateur de Linux Linux Torvalds
Linus Torvalds
Créé le Linux noyau tout en
à l'université d'Helsinki (Finlande)
Paru le 16 septembre 1991

Bases de Linux


Fondateur de Debian Ian Murdock
Ian Murdock
Créé Debian Pendant que
Université Purdue (Indiana)
Paru le 16 août 1993

Bien que beaucoup puissent craindre Linux en raison de sa complexité, c'est cette complexité même qui le rend si intéressant et bénéfique. Et comme pour tout ce qui est complexe, pris comme une série de petits morceaux plus simples (comme nous le faisons sur nos pages de guide), cela devient facile. Avec toutes ses pièces, Linux est comme un coffre à jouets sans fond qui vous procurera de nombreuses années d’apprentissage. "Ne jamais arrêter d'apprendre" comme on dit. Votre cerveau a besoin d'exercice autant que votre corps. Gardez la forme ou vous courez le risque de devenir un navet mental à l'âge de 70 ans. Linux est un excellent exerciseur cérébral.

Avant que Microsoft ne développe Windows, les ordinateurs Macintosh étaient plus populaires. Il était plus facile pour les nouveaux utilisateurs d’ordinateur d'utiliser une souris pour pointer de jolies petites images plutôt que de devoir apprendre un tas de commandes DOS. Cependant, vous ne pouviez pas écrire de fichiers de commandes sur un Mac, ni rediriger le contenu d'un texte ou d'un fichier vers des ports, diriger l'entrée vers des commandes, entreprendre des actions en fonction de codes de retour, etc., etc. Bien que l'interface graphique de Mac facilite l'utilisation d'un ordinateur, il vous a isolé du noyau matériel et système d'exploitation, limitant votre capacité à exécuter des commandes et à automatiser des tâches. Et l’automatisation, c’est-à-dire que l’ordinateur ne fait pas le travail à votre place, quels ordinateurs étaient supposés être? L'interface graphique Mac a fait tout le contraire. Cela nécessitait l'intervention de l'utilisateur pour tout accomplir. Une comparaison similaire peut maintenant être faite entre les serveurs Windows et Linux / UNIX et les mêmes équations sont vraies:

Simplicité = Limites
Complexité = Capacités


C'est le cas avec à peu près n'importe quoi. Un système audio avec une seule commande de "tonalité" est facile à utiliser, mais il ne vous donne pas les options de qualité sonore comparables à celles d’un égaliseur graphique à 15 bandes. Bien qu'il soit plus facile d'apprendre à utiliser un système d'exploitation serveur Windows, vous le payez en étant obligé de fournir manuellement des entrées et en limitant votre capacité à automatiser. Le véritable inconvénient est que l’automatisation (le fait que les ordinateurs exécutent des tâches au lieu de personnes) est ce qui procure les gains de productivité les plus importants, et les gains de productivité peuvent réduire les coûts et augmenter l’avantage concurrentiel d’une entreprise.

Bien qu'il puisse sembler incroyable qu'un ancien système Pentium et 35 USD signifie que vous puissiez disposer de votre propre réseau Internet, LAN, passerelle ou serveur d'applications Linux, nos pages de guide vous montreront à quel point il est facile de le faire. Le montant de 35 $ correspond à un ensemble de 14 DVD contenant la distribution officielle Debian Linux, qui est vendue par les vendeurs sur le Web (maintenant nous!) Les 35 dollars US servent uniquement à couvrir les coûts des supports, de la duplication et de l'étiquetage. Le logiciel Debian Linux est absolument gratuit et vous pouvez configurer autant de systèmes que vous le souhaitez, sans problème de licence, une fois que vous avez les DVD. Vous pouvez télécharger des images de DVD ou de CD directement depuis l’un des miroirs de Debian et graver les vôtres. Cependant, étant donné que vous téléchargeriez plus de 65 gigaoctets des données qu'il faudrait un longue temps. Lorsque vous prenez en compte le coût des flans et le temps qu’il faudrait pour obtenir un téléchargement non corrompu, puis graver, toutes les images dont vous auriez besoin beaucoup de temps libre pour que le téléchargement en vaille la peine. Compte tenu de tous les types de serveurs que vous pouvez configurer (voir la liste ci-dessous), un ensemble de DVD à 35 $ constitue un bon investissement pour votre formation.

Linux fonctionnera sur de nombreuses plates-formes matérielles différentes et Debian prend en charge la plus grande variété, chaque plate-forme ayant son propre jeu de disques. C'est pourquoi vous verrez les ensembles de DVD Debian proposés avec des notations telles que 'i386' et 'amd64' pour les PC Intel, 'PPC' (PowerPC) pour les Mac plus anciens et même un ensemble 's390x' pour les mainframes IBM. Notez que si vous souhaitez installer Debian sur un ancien PC Intel / AMD / Cyrix, vous aurez besoin du jeu de disques 'i386'. Les processeurs Intel et AMD 64 bits plus récents peuvent exécuter le jeu 'amd64' ainsi que le jeu 'i386'.

Recycler les ordinateurs sous LinuxLorsque vous prononcez le mot "serveur", la plupart des gens pensent que vous parlez de systèmes coûteux et puissants dotés de disques RAID et de processeurs doubles. Rien ne pourrait être plus éloigné de la vérité. Tout ancien PC peut être un serveur. C'est en fait le logiciel que vous utilisez qui détermine si un PC est un serveur ou un "poste de travail". Et, grâce aux exigences matérielles modestes de Linux, vous n'avez pas besoin d'un PC pour configurer un serveur. Les vieux PC peuvent avoir une nouvelle vie en tant que serveurs Linux. Et si vous disposez de matériel serveur plus ancien, vous serez très impressionné par les performances de Debian sur ces systèmes qui, à votre avis, ne pourraient être utiles à personne. Qu'il s'agisse d'anciens serveurs Dell, HP, IBM ou Compaq, je n'ai pas encore rencontré de système où Debian n'a pas détecté avec précision le contrôleur RAID et autre matériel au cours du processus d'installation.



Pourquoi VIEUX Est BIEN

Les anciens PC constituent d'excellents systèmes d'apprentissage de Linux pour les raisons suivantes:

  • Les performances de Debian en tant que serveur (lire "No GUI") sont étonnamment bonnes sur du vieux matériel.
  • C'est la chose "verte" à faire car cela maintiendra ces vieux systèmes hors des sites d'enfouissement.
  • Ces vieux PC ne coûtent presque rien. Demandez autour de vous et vous pourrez peut-être en obtenir un gratuitement, car disposer de vieux PC avec tous leurs composants électroniques n'est pas facile.
  • La raison principale – ils sont lents. Lent c'est bien, car cela vous donne le temps de voir les messages à l'écran. Démarrez Debian sur un système Pentium plus récent et tous les messages à l’écran deviendront flous. La lecture des messages à l'écran de démarrage est non seulement pédagogique, car elle vous indique ce que fait le système d'exploitation, mais elle vous avertit également de tout problème potentiel. Un défilement plus lent du texte à l'écran est également utile lors de l'exécution de certaines applications de la console.



La meilleure façon de jouer avec un serveur Linux est de se procurer un ancien PC Intel Pentium sans moniteur ni clavier lors d'une réunion d'échange ou de sites comme eBay ou Craigs List. Ensuite, procurez-vous également un commutateur KVM (clavier / vidéo / souris) à 2 ports pour pouvoir utiliser le moniteur et le clavier à partir de votre PC actuel sur les deux systèmes. L'installation de Linux sur un système séparé ne coûte pas cher et est beaucoup plus sûre, car vous ne risquerez pas de laisser tomber votre système Windows principal en essayant de réaliser un scénario à double amorçage multi-partitions où Windows et Linux sont installés sur le même système. disque dur. (En outre, vous souhaiterez utiliser votre système Windows pour accéder à votre serveur Debian et le tester, ce que vous ne pouvez pas faire avec une configuration à double amorçage. Nous vous montrons comment mettre en réseau deux systèmes à l'aide de deux cartes réseau et d'un câble croisé Obtenir un ancien système Intel est à la fois utile et peu coûteux, car vous êtes moins susceptible d’être confronté à des problèmes de prise en charge du jeu de puces et de pilotes que vous pouvez rencontrer avec du matériel plus récent. Vous pouvez non seulement récupérer un système Pentium usagé (sans moniteur ni clavier) sur eBay pour bien moins de 30 $ ces jours-ci, mais, étant donné que les souris et les claviers sont tous dotés d'un port USB, vous pouvez vous procurer un KVM PS / 2 avec des câbles bon marché pour. autour de 10 $. Assurez-vous simplement que l'ancien système dispose d'une interface réseau intégrée et d'un lecteur de DVD-ROM (une carte son n'est pas nécessaire sur un serveur). Un disque dur de 40 Go et 512 Mo de RAM, c'est amplement. Si vos systèmes ne possèdent pas de carte réseau, vous pouvez vous procurer des cartes réseau 3Com 3C905 (PCI) sur eBay pour moins de 10 $.


Configuration du serveur Linux


Linux est le nom système d'exploitation*. Cependant, contrairement à Windows, il est disponible auprès de nombreuses entreprises. Ces sociétés peuvent ajouter leurs propres fonctionnalités au système d’exploitation (comme une routine d’installation graphique), mais elles utilisent toutes une version du "noyau" Linux (c’est-à-dire le guts du système d’exploitation). Les versions Linux de différentes sociétés sont appelées "distributions" (ou "distributions"). La distribution Red Hat est la distribution commerciale la plus populaire, Suse et Mandrake étant deux autres. Les distributions commerciales sont produites par des entreprises qui cherchent à réaliser des bénéfices en vendant et en supportant leurs distributions de Linux. (Si vous voyez une distribution simplement appelée "Linux", par exemple "Linux 9", c’est Red Hat.) Debian (prononcée deb-ee-en) est un peu différente. C'est le leader mondial non commercial distribution produite par des développeurs volontaires du monde entier cherchant à promouvoir le concept de logiciel libre et ouvert sur lequel Linux a été initialement créé.

* Techniquement, alors que le terme "Linux" est couramment utilisé pour désigner le système d'exploitation, Linux n'est en réalité que le noyau. Le reste du système d'exploitation (utilitaires de ligne de commande, etc.) provient généralement du projet de logiciel libre GNU. C’est pourquoi Debian est officiellement appelé "Debian GNU / Linux".

Les distributions Commerical deviennent propriétaires lorsqu'elles remplacent certaines des parties GNU du système d'exploitation couramment utilisées par les leurs. C'est à ce stade que vous commencez à avoir des problèmes spécifiques à la distribution et des exigences en matière de mises à niveau / support.

Red Hat est réputé pour remplacer de nombreuses commandes GNU UNIX standard par des commandes propriétaires non standard. En conséquence, de nombreux ouvrages et ressources Linux disponibles gratuitement sur le Web ne peuvent pas être utilisés avec un système Red Hat. Même les livres et les ressources qui couvrent des versions antérieures de Red Hat sont difficiles à utiliser car davantage de commandes sont modifiées à chaque nouvelle version. Dans quelques années, Red Hat Linux pourrait ne plus ressembler à «Linux».

Les distributions seront également différentes dans le /Emplacements et des noms des fichiers de configuration. Par exemple, les fichiers contenant les informations de configuration de la carte réseau sont les suivants:

Debian

/ etc / network /interfaces

chapeau rouge

/ etc / sysconfig / network-scripts /ifcfg-eth0
(Un fichier séparé pour chaque interface)

Suse


Pour les versions> = 8.0
/ etc / sysconfig / network /ifcfg-eth0
(Un fichier séparé pour chaque interface)
Pour les versions <8.0
/etc/rc.config


La distribution Debian a été créée en 1993 par Ian Murdock alors qu’il étudiait en informatique à l’Université Purdue. Il souhaitait une distribution Linux maintenue de manière libre et ouverte, conformément à l'intention initiale des logiciels Linux et GNU. (Le nom de Debian vient de la combinaison de son nom avec celui de sa future épouse, Debra.) En plus de développer le logiciel initial, il a rédigé le manifeste de Debian, qui décrit sa vision d’une distribution Linux libre et ouverte.

Le pedigree GNU / Linux de Debian et son adhésion aux normes en font une distribution de choix, notamment pour une mission Space Shuttle en 1997. Vous pouvez ajouter à votre système des applications de bureau, des applications serveur, des utilitaires, des outils de développement, etc. commande unique.



Client léger

Les bibliothèques et les établissements d’enseignement de tous les niveaux, voire les entreprises, peuvent tirer parti du projet Linux Terminal Server (LTSP). Les ordinateurs plus anciens sans disque dur peuvent être utilisés comme "X-Terminals" (clients légers), tandis que la gestion des postes de travail et des applications (telles que Open Office et Mozilla Web Browser) est gérée sur un serveur X central. Vous pouvez configurer un serveur de terminal et disposer d’un bureau rempli de stations de travail sans disque pour un investissement logiciel de 35 $. Un paquet Debian LTSP facilite l’installation. Parce que les systèmes des utilisateurs finaux ne disposent pas de disques durs:

  • Il y a moins de pannes matérielles à traiter
  • Les postes de travail consomment moins d’énergie, plus frais et plus silencieux
  • Les utilisateurs ne peuvent ni modifier ni pirater les configurations de la station de travail ou les logiciels, ce qui réduit les besoins d'assistance.

En outre, les modifications apportées à l'environnement de bureau sont effectuées à un emplacement central plutôt que de passer d'un PC à un autre.

Les administrateurs d'école peuvent également vouloir passer en revue SkoleLinux. C’est une distribution Linux développée spécifiquement pour les écoles par le Debian Edu projet. SkoleLinux, avec ses 1 700 écoles, a été adopté dans l’État fédéral allemand de Rhénanie-Palatinat. La dernière version utilise GOsa, un système de gestion Web basé sur une interface graphique pour tout configurer. Vérifiez Commencer document de synthèse.



En tant que distribution non commerciale, Debian n’a pas à créer de nouvelles versions pour générer des revenus. Certains critiquent parfois Debian pour cela, mais vous pouvez parier un salaire d'années qu'ils ne sont pas administrateurs de réseau. Les administrateurs réseau n'aiment pas mettre à niveau ou remplacer les serveurs (ce qui est évident car Microsoft a dû annuler ses projets initiaux de cesser de prendre en charge les versions de serveur antérieures, car de nombreux serveurs Windows utilisaient encore les systèmes d'exploitation antérieurs tels que Windows 2000.) . "Si cela fonctionne, ne le répare pas." Plus que tout, les administrateurs de réseau veulent des serveurs stables et fiables qui restent en place et accomplissent leur travail, année après année, avec peu d’attention, voire aucune. Si vous n'aimez pas les serveurs de babysitting, vous adorerez Debian. Sa réputation de système d'exploitation à toute épreuve tient en partie à ce qu'ils ne se précipitent pas pour créer de nouvelles versions.

Une autre raison pour laquelle vous souhaitez apprendre Linux est la popularité croissante de la virtualisation (création de plusieurs serveurs virtuels sur un seul système physique). Le géant de la virtualisation est le progiciel ESX de VMware. Vous installez le logiciel ESX sur un système de la même manière que vous installeriez une distribution Linux sur un système. Vous utilisez ensuite les utilitaires ESX pour créer des machines virtuelles et installer un système d'exploitation "invité" (Linux, UNIX, Windows) sur ces systèmes virtuels. ESX est basé sur Linux. Plus vous en saurez sur Linux, mieux vous pourrez travailler avec ESX (demandez à mes collègues qui étaient jaloux de mes compétences en Linux lorsque nous avons commencé à utiliser ESX). Cela est particulièrement vrai car de nombreux outils ESX ne sont disponibles que sur la ligne de commande.

Utiliser Linux Haut de page

Linux peut être utilisé pour configurer autant de systèmes de type serveur que de postes de travail. Ce site concerne principalement les aspects serveur de Linux. Vous pouvez utiliser votre logiciel Debian Linux pour configurer les types de systèmes suivants:

  • Serveurs Web pour externes (Intheunet) ou interne (Intrautilisation nette). (Nous vous montrons comment sur le Serveurs Internet page.)
  • Serveurs de messagerie pour gérer à la fois le courrier électronique interne et Internet. (Nous vous montrons comment sur le Serveurs Internet page.)
  • Autres serveurs d'applications de type Internet tels que FTP, news, IRC (chat), etc.
  • Des serveurs Web cam pour garder un œil sur vos opérations domestiques ou professionnelles depuis un emplacement distant. (Nous vous montrons comment sur le Web Cam Server page.)
  • Serveurs proxy / NAT qui permettent à tous les systèmes d’un réseau de partager une seule connexion Internet haut débit à la maison ou au bureau. (Nous vous montrons comment sur la page Proxy / NAT.)
  • Des pare-feu à filtrage de paquets vous permettant de contrôler le trafic sortant et entrant sur votre réseau (tout en effectuant la fonction proxy / NAT). (Nous vous montrons comment sur la page Firewall.)
  • Serveurs LAN internes pour le partage de fichiers et d’impressions, un peu comme Windows. Il existe même un progiciel Linux appelé Samba qui fait en sorte qu'un serveur Linux apparaisse comme un serveur Windows sur des postes de travail Windows. (Nous vous montrons comment sur le Serveurs LAN page.)
  • Serveurs DNS pour résoudre les noms d’hôte / de domaine Internet et / ou de réseau local. (Nous vous montrons comment sur le DNS page.)
  • Serveurs de base de données exécutant MaxDB – anciennement logiciel de base de données SAPDB (gratuit), MySQL (gratuit) ou Oracle ($$$$). (Nous vous montrons comment sur le Serveur de base de données page.)
  • Les serveurs de télécopie exécutant HylaFax et utilisant d'anciens modems de télécopie permettent à tous les utilisateurs de votre réseau d'envoyer des télécopies à partir de leur ordinateur de bureau plutôt que d'imprimer une copie papier dans un télécopieur. (Nous vous montrons comment sur le Serveur de fax page.)
  • Routeurs LAN et WAN qui offrent une alternative peu coûteuse à ces 5000 boîtiers Cisco.
  • Serveurs Syslog qui vous permettent de centraliser la surveillance de votre réseau et des opérations de vos systèmes. (Nous vous montrons comment sur le Serveur Syslog page.)
  • IDS (Intrusion Detection Systems) pour surveiller votre espace d'adressage Internet à des fins de piratage et d'attaque. (Nous vous montrons comment sur le Grognement page.)
  • Un PBX logiciel pour votre maison ou votre bureau qui fonctionne avec les téléphones IP et fournit à chacun son propre poste et sa messagerie vocale. (Le Astérisque application.)

Compte tenu de la nature libre du logiciel Linux et de ses besoins matériels modestes, les petites entreprises à but non lucratif, les écoles, les bibliothèques, etc. peuvent disposer de toutes les capacités informatiques et des services Internet de grandes entreprises à but lucratif ne disposant que de très peu d'investissements financiers. Et Linux n'est pas juste pour le petit gars. Les grandes entreprises peuvent économiser gros dollars avec Linux car ils n’ont pas à payer pour tous ces coûteux accès client ou licences "sièges" (voir le diagramme de comparaison de serveurs ci-dessous).

L'autre avantage des exigences matérielles modestes de Linux réside dans le fait que, si vous disposez d'une machine assez puissante, vous pouvez exécuter de nombreuses applications (telles que Web et messagerie électronique, FTP, Telnet et DNS), le tout sur un système, réduisant ainsi la configuration matérielle requise. . (S'il est certainement possible qu'un seul serveur gère à la fois les fonctions LAN internes et les fonctions Internet externes, il n'est pas judicieux de placer les deux fonctions sur un serveur pour des raisons de sécurité.)

Les options de support pour les systèmes basés sur Linux augmentent également. Les fournisseurs de serveurs commerciaux HP, IBM et Dell proposent désormais des serveurs préchargés avec Linux et offrent de nombreuses options de support. Les fournisseurs de distribution commerciale disposent de différents packages de support et les sociétés tierces proposent des options de support spécifiques à la distribution, allant de la couverture par incident à la couverture contractuelle 24/7. Pour les particuliers et les petites entreprises, il existe des options d’entraide et d’entraide gratuites, telles que la documentation en ligne, les groupes de discussion, les listes de diffusion et les salles de discussion. Nous vous montrons comment utiliser l’une des salles de discussion Debian sur la page Logiciel de compilation et que les ressources de support Debian sont répertoriées sur la page Ressources.

Si vous recherchez une carrière, il existe deux catégories d’emplois utilisant des serveurs Linux / UNIX, mais elles peuvent souvent se chevaucher. Vous pouvez vous concentrer sur une carrière en tant que administrateur réseau, où vous vous occupez principalement de tous les types de systèmes mentionnés ci-dessus, gérez des comptes d’utilisateur, des droits d’accès aux fichiers, etc. programmeur, où vous écrivez des scripts shell ou des programmes pouvant être écrits dans une grande variété de langues, C étant la plus utilisée. Ces scripts et programmes sont souvent utilisés dans les niveaux intermédiaire ou "back-end" des systèmes client / serveur "à plusieurs niveaux" pour automatiser des tâches. Par exemple, les serveurs Linux / UNIX sont souvent utilisés comme serveurs de base de données principaux exécutant Oracle. Dans les grandes organisations, ces deux aspects sont généralement séparés par des intitulés de poste différents. Dans les petites organisations, vous pouvez vous retrouver à faire les deux, ce qui serait la meilleure formation que vous puissiez demander. Notez qu'un administrateur réseau trouvera sa vie beaucoup plus facile s'il est un bon programmeur de scripts shell. Mieux ils écrivent des scripts shell, plus ils peuvent automatiser les tâches administratives sur les serveurs. Alors que de plus en plus d'entreprises découvrent le potentiel de gains de productivité et les économies substantielles réalisées grâce aux coûts de licence réduits associés à Linux, les entreprises possédant des connaissances en Linux seront de plus en plus demandées.

Cela ne veut pas dire que vous devez utiliser la mise en réseau ou la programmation C pour pouvoir utiliser Linux. Une installation vanilla de la plupart des distributions Linux inclura l’installation et la configuration du logiciel serveur Web Apache. Un système Linux prêt à l'emploi peut servir de serveur Web de test pour les développeurs de sites Web et ceux qui écrivent des scripts CGI pour des sites Web (dont vous connaissez la valeur si vous avez déjà supprimé un serveur Web de production hébergeant plus de 200 sites avec un script CGI en boucle). Ceux qui souhaitent apprendre le développement Web peuvent configurer un serveur Web Apache avec une interface frontale PHP et une base de données MySQL et disposer d’une plate-forme de développement à deux niveaux sur un seul PC. (Nous vous montrons comment sur la page des serveurs Internet.)

Linux peut aussi être utile à la maison. Il est facile de l'utiliser pour configurer un serveur proxy de pare-feu afin de partager une connexion Internet haut débit avec tous les ordinateurs d'un réseau domestique. (Nous vous montrons comment sur la page Réseau.)

Normalement, si vous souhaitez configurer un serveur de courrier électronique ou Web, vous devez disposer d'une adresse IP fixe ("statique") attribuée par votre fournisseur de services Internet et de votre propre nom de domaine. Toutefois, si vous avez enregistré un nom de domaine, tel que le nom de famille de votre famille en tant que nom de domaine, vous pouvez utiliser dynamique DNS qui compense le fait que les adresses IP avec la plupart des services Internet à domicile ont tendance à changer de temps en temps. Vous pouvez configurer un serveur Sendmail pour recevoir un e-mail pour votre nom de domaine (ex: homer@simpson.com). Les membres de la famille configurent ensuite leurs clients POP3 pour qu'ils récupèrent leurs messages sur ce serveur Sendmail plutôt que sur ceux du fournisseur de services Internet. En outre, vous pouvez exécuter le logiciel serveur Web Apache sur le même système et héberger votre propre site Web familial. Des informations sur l’utilisation des services DNS dynamiques sont données sur la page DNS et la configuration d’un serveur Web / messagerie à l’aide des logiciels Apache et Sendmail est donnée à la page. Serveurs Internet page.

Un peu comme DOS Haut de page

Linux est un OS avec un personnageinterface basée sur le type DOS. DOS était une interface basée sur des caractères avec son interpréteur de commande dans le fichier COMMAND.COM. Lorsque vous ouvrez un Invite de commande Dans Windows, vous exécutez l’interpréteur de commandes CMD.EXE, similaire à l’interpréteur COMMAND.COM de DOS. C’est cet interprète qui vous donne la C: > invite lorsque vous ouvrez une fenêtre d'invite de commande ou démarrez un système DOS. (Vous voyez maintenant pourquoi ils l'appellent un "interprète". Il interprète les commandes que vous tapez à l'invite.)

Alors que DOS n'a qu'une seule interface basée sur des caractères, Linux (et UNIX) en a plusieurs parmi lesquelles vous pouvez choisir. Au lieu d '"interprètes", on les appelle "coquilles" (mais ce sont toujours des interprètes). UNIX a trois coques standard; C, Korn et Bourne.

Linux a ses propres versions de ces trois shells UNIX populaires et quelques unes de ses propres. L'un d'eux s'appelle "Bash", pour Bourne-Again Shell, et il s'agit du shell par défaut pour la plupart des distributions Linux, car il combine la plupart des fonctionnalités des shells Bourne et Korn.

Les shells Linux / UNIX ont leurs propres invites. Lorsque vous vous connectez à un système Linux, vous verrez soit % ou $ selon le shell que vous choisissez d'utiliser. Il y a aussi une troisième invite qui est la # si vous vous connectez en tant que "root". "root" est le compte superutilisateur sous Linux / UNIX, similaire à "administrateur" avec Windows.

Comme vous le feriez pour entrer des commandes comme dir et copie à une invite de commande, vous entrez des commandes telles que ls et cp à l'invite du shell Linux.

Et tout comme Windows 3.1 fournissait une interface graphique aux systèmes basés sur DOS, Linux dispose également de plusieurs interfaces graphiques. L'interface graphique la plus largement utilisée est Gnome. KDE est une autre interface graphique populaire. Mais comme il n’a pas beaucoup de sens d’avoir deux interfaces graphiques différentes sur un système, vous n’installez habituellement que l’un ou l’autre. Lorsque vous recherchez des logiciels Linux sur Internet, vous verrez souvent des programmes dont le nom commence par un G ou un K (comme Gpad), ce qui indique qu'il s'agit de programmes qui ne fonctionneront qu'avec ces interfaces graphiques spécifiques.

Vous verrez également souvent que les noms de programme de l’interface graphique commencent par un X ou appelés programmes "X11", "X windows" ou simplement "X". En effet, l'interface graphique sous Linux / UNIX est un peu plus sophistiquée. Un logiciel appelé «serveur X» génère en réalité les graphiques, et un autre, appelé «gestionnaire de bureau» (comme Gnome ou KDE) gère l’affichage des graphiques. Ceci est fait de sorte qu'un serveur central puisse générer les graphiques tandis que des stations de travail individuelles peuvent les afficher comme bon leur semble en personnalisant les paramètres de leur gestionnaire de bureau. (Linux / UNIX faisait partie des "clients légers" bien avant que cela ne devienne à la mode dans le monde Windows.) Sur un seul PC Linux avec une interface graphique installée, la partie serveur X et la partie bureau ne fonctionnent que sur le même ordinateur. (Les programmes qui ne sont pas écrits pour une interface graphique, c’est-à-dire écrits pour l’interface shell à base de caractères, sont appelés programmes "console".)

En vous appuyant un peu plus sur les comparaisons Windows, vous connaissez peut-être Windows 2000. Il existait deux versions de Windows 2000, Server et Professional (Workstation). Sous Linux, il n’existe qu’une version, et un système Linux peut être un serveur ou un poste de travail. ou les deux simultanément. Vous décidez si le système est un serveur ou une station de travail uniquement par les services et les applications que vous exécutez sur celui-ci.



Linux et PC Windows

Par rapport à un PC Windows commun, la principale différence est que l'interface graphique est intégrée au système d'exploitation avec les versions de Windows ultérieures à la version 3.x. Comme vous pouvez le constater, ils sont identiques sur le plan conceptuel. C'est juste que les logiciels (OS et applications) qui sont exécutés sur le système sont différents, et avec Linux, l'interface graphique est exécutée comme une application optionnelle (elle n'est pas imposée par le système d'exploitation). Sachez que les éléments répertoriés dans la couche "Application" sont spécifiques au système d'exploitation. En d’autres termes, vous ne pouvez pas exécuter d’applications Windows sur un système Linux ni d’applications Linux sur un système Windows. Certaines applications "de marque" plus grandes sont disponibles dans différentes versions, spécifiques à la plate-forme. Par exemple, Adobe Acrobat Reader a des versions disponibles pour Windows, Linux et Macintosh.

Les vraies différences entre Linux et Windows sont visibles dans la zone du serveur. Alors que Windows Server 2016 explorait un système de classe Pentium plus ancien (s'il pouvait être installé du tout), ce même matériel constituerait un serveur Linux respectable. La plus grande différence, cependant, concerne les coûts de logiciels et de licences. Bien que le logiciel serveur Windows inclue le logiciel serveur Web IIS, le logiciel serveur vous coûtera 800 USD. Et ce n'est que pour anonyme accès aux pages Web hébergées sur le serveur. Si vous envisagez de créer des pages Web auxquelles les utilisateurs se connectent, vous devez obtenir une "licence de connecteur Internet" pour une connexion. Additionnel 1 900 dollars. Le logiciel du serveur de messagerie Exchange coûte environ 3 000 dollars, mais ce sera un serveur de messagerie auquel personne ne peut accéder. Pour cela, vous avez besoin de licences d’accès client (Licences d’accès client). Vous avez besoin non seulement de CAL Exchange (environ 40 USD par utilisateur) pour que les utilisateurs puissent utilisation l’application Exchange, mais étant donné que l’application Exchange est hébergée sur un serveur Windows, vous avez besoin de licences d’accès client Windows Server (coûtant environ 36 USD par utilisateur) pour qu'ils puissent accès L'application. Voici comment les coûts se comparent pour 100 utilisateurs avec une combinaison serveur Web / messagerie:



Comparaison des coûts des serveurs Linux et Windows

Et cela n'entre même pas dans les coûts annuels associés au programme "Software Assurance" de Microsoft. Ces coûts servent uniquement à mettre les choses en place au départ. Les prix ci-dessus ont été extraits du site Web CDW (www.cdw.com) pour les produits Windows 2012 et Exchange 2016. Si votre entreprise compte près de 500 utilisateurs, les CAL Exchange et Server supplémentaires augmentent le coût à près de 42 000 USD. Vous pouvez vérifier la nécessité du connecteur et des licences CAL ci-dessus en appelant Microsoft à l'adresse 1-800-RU-LEGIT et sélectionnez les options pour les licences avant-vente. Et ce n'est que pour un serveur Web / E-mail. La configuration d’un serveur de base de données à l’aide de SQL Server implique également des CAL d’application, de sorte que la différence de coût entre Linux et Windows pour une organisation de taille moyenne se situe bien dans les six chiffres pour deux serveurs.

Si vous envisagez de faire appel à un cabinet de conseil pour l'implémentation d'un nouveau système, demandez-leur s'ils proposent des solutions Linux et UNIX. S'ils ne le font pas, vous n'obtiendrez que les produits Microsoft proposés, ce qui sera peut-être mieux pour le cabinet de conseil, car ils obtiennent une partie de l'action, mais vous obtiendrez tout sauf la solution la plus économique. vos besoins. Si seules les solutions Microsoft sont proposées, demandez-leur pourquoi, étant donné les économies potentielles pour vous (leur client), ils ne proposent aucune solution Linux ou UNIX, en particulier dans le domaine des serveurs Internet. Méfiez-vous s'ils déduisent que Linux n'est ni mature ni stable. Les serveurs Linux sont vendus par IBM, HP, Dell et d’autres qui vendent aux clients du Fortune 500. Même s’il peut y avoir des domaines dans lesquels une solution Windows est appropriée, tels que les exigences des applications ou la nécessité de s’interfacer avec un système Windows hérité, toute entreprise qui fonde ses propositions sur une attitude "une seule et même solution ne convient pas à tous" n’a pas votre meilleur intérêts à coeur.

Les serveurs Web et de courrier électronique sont peut-être le lieu le plus facile pour économiser beaucoup d'argent avec Linux. Bien que la suite Microsoft Office soit installée sur de nombreux ordinateurs de bureau, Outlook et Outlook Express ne s’inquiètent pas du fait qu’ils extraient des messages d’un serveur IMAP comme avec Exchange sous Windows ou d’un serveur POP comme de Sendmail sous Linux. Et la sortie de Samba 3.0 (voir le Serveurs LAN page) peut être utilisé pour ajouter un serveur de messagerie Linux à Windows Active Directory afin de gérer l’authentification de l’utilisateur. En ce qui concerne les serveurs Web, IE ne s’inquiète pas du fait qu’il tire des pages d’un serveur Linux Apache ou Windows IIS et vous verrez à la page suivante: Serveurs Internet page qu'il est maintenant possible d'exécuter des pages ASP sur Apache.

Un domaine où les organisations pourraient économiser substantiel L’utilisation de Linux avec des serveurs de base de données est rentable, car les licences d’utilisateur ou de siège de base de données (Oracle et MS SQL Server) sont généralement les plus chères. Dans la plupart des cas, un connecteur ODBC se situe entre le serveur de base de données et les applications exécutées sur les postes de travail clients. L'intérêt de remplacer un serveur de base de données par un seul exécutant Linux et un produit de base de données gratuit réside dans le fait que vous utilisez simplement un connecteur ODBC différent (le connecteur myODBC dans le cas de MySQL) sur les clients. Si un serveur de base de données joue le rôle de serveur principal dans une application basée sur un navigateur frontal, changez simplement le connecteur ODBC sur le serveur Web. Aucun changement de client n'est nécessaire. Avec SAP AG En publiant leur produit de base de données back-end en tant que source ouverte (MaxDB) et MySQL offrant des fonctionnalités de niveau entreprise à chaque nouvelle version, il n’ya aucune raison de supporter le coût d’un serveur principal Oracle ou SQL Server. Nous allons vous montrer comment configurer un serveur de base de données MySQL et un connecteur ODBC sur la page du serveur de base de données. De plus, MaxDB et MySQL proposent des options de support commercial. (Des liens vers les sites MaxDB et MySQL, ainsi que vers plusieurs sites de référence de qualité, figurent à la page Ressources.) L'avantage de MySQL à ce stade est qu'il est inclus dans les distributions officielles de Debian sous forme de paquet .deb, de sorte que l'installation est: plus pratique. Tandis que de plus en plus d'entreprises réalisent les économies de coûts potentielles résultant de l'utilisation des produits de base de données open source, celles qui en ont l'expérience bénéficieront d'un avantage.

Nous avons vu des comparaisons entre Linux et DOS et Linux et Windows, mais Linux est très semblable à UNIX. Si votre objectif est d’être un administrateur UNIX, apprendre Linux vous permettra d’obtenir 90% du chemin. Ce n'est pas une exagération. J'ai suivi un cours UNIX dans notre collège communautaire local (qui utilisait un serveur IBM fonctionnant sous AIX – le goût d'UNIX sous IBM) et je n'avais rencontré dans mes affectations aucun projet que je ne pouvais pas faire sur mon système Linux. Linux est même livré avec un shell Korn, qui était celui que nous utilisions dans ma classe UNIX en raison de ses fonctionnalités de script améliorées. J'ai simplement configuré mon système Linux pour qu'il exécute le shell Korn par défaut, ce qui m'a permis d'avoir la même "interface utilisateur" à la maison que celle que j'avais sur le système UNIX à l'école.

En jouant avec la version x86 (sur PC) de Solaris (la version UNIX de Sun Microsystem), j'ai acheté un livre intitulé "Guide pratique de Solaris". 70% du livre couvre des commandes pouvant être entrées à l'invite du shell d'un système Linux! (Si vous souhaitez utiliser la version x86 de Solaris pour connaître ce système d'exploitation UNIX, consultez notre page Essai de Sun Solaris pour x86.)

Si tu es un nerd de cœur, crois-moi quand je te dirai AMOUR Linux. Il a tellement de fonctionnalités qu'il confond l'esprit. C'est un système d'exploitation avec lequel vous pouvez jouer pendant cinq ans et qui vous permet de trouver de nouvelles fonctionnalités. Dire que c'est comme DOS sur les stéroïdes serait un euphémisme. Son atout majeur est sa capacité à automatiser les opérations grâce à sa multitude de fonctions et à ses capacités de script. Sign up for a beginner's Linux or UNIX class at your local community college and you'll see what I'm talking about. Even in a basic class you'll learn about a lot of the neat things it can do. The one down-side to Linux/UNIX is that it's not a user-friendly OS so there is a learning curve involved. Using one of Linux's GUI interfaces is helpful in this respect but to really learn this OS you'll want to use one of the character-based shells. Don't be discouraged if you find Linux confusing. Due to its myriad of commands and capabilities that's not uncommon. I found taking a UNIX basics class at my local community college to be VERY helpful. However, I also found it very helpful to do a little playing around and reading up on Linux before starting the UNIX class as it allowed me to better understand and appreciate what was being taught. If you've done any Perl programming for CGI scripts on a Website you will find that knowledge helpful also. Not only because you can use Perl to write shell scripts, but because the syntaxes of Perl statements are similar to Linux/UNIX OS commands.



Avoid the GUI !!!

In order to truly learn Linux you have to learn to use its commands at a shell prompt and work with text configuration files. Many things are not available in a GUI, and the power of automation that Linux offers can only be fully utilized with shell scripts which, as mentioned above, are merely text files containing a series of commands. The GUI makes sense for things like Web browsing, but even in a GUI you should have a terminal window open so you can enter shell commands.

Another reason to avoid GUIs is that they eat up system resources. If you're running multiple server applications on a system with limited RAM, firing up a GUI can slow these applications considerably.

There are also security considerations when running a GUI. A GUI should never be installed on a server. The X-server part of a GUI setup is, after all, a server. As such, it opens ports and uses them to "listen" for remote connections. Unnecessary open ports on an Internet-connected system provide another potential entry point for hackers. Because of this, all of the guides on this site only use the character (command line) shell interface.

Most ISPs and Web site hosting services use Linux or UNIX servers. One benefit of learning to use Linux/UNIX commands is that, if your ISP or Web site hosting service includes "shell access" with your account, you'll be able to telnet into your server and use commands at the shell prompt to perform tasks that simply can't be done using an ftp program or a Web-based site management tool.

Another key benefit is that if you know how to enter commands at the shell prompt, you'll know what commands to enter into shell scripts to automate tasks. The automation capabilities of shell scripts, when combined with a memory-resident scheduler like cron to run those scripts at regular intervals, will allow you to set up systems that do most of the work for you. On the Security page we'll show you how to use cron and a shell script to automate the process of retreiving and applying the latest security patches for your system which will help protect Internet-connected servers from new worms and exploits.



Stuck In A Windows World ?


A lot of times the hardest thing about learning to use Linux is getting to use Linux on a daily basis. Many organizations are entrenched in Windows and opportunities to work with Linux simply don't exist.

If you're a network or systems administrator in one of these entrenched environments, one possible solution is to suggest setting up Linux on one or two older PCs to be used in two capacities:

  • As a network monitoring and troubleshooting tool
  • As a security monitoring and testing tool (especially if you have Internet-connected systems)

The reason being is that, as you'll see on the Network Monitoring page, there are a ton of libre network monitoring tools (ntop network traffic probe for example) and security utilities (the nmap port scanner for one) available for Linux, and bosses find it hard to argue with the word "free". On a LAN-connected system, running the Wireshark (formerly Ethereal) protocol analyzer can provide you with much of the same information as commerical sniffers costing thousand$ of dollar$ (take it from someone who has used both Wireshark on Linux and Fluke's Protocol Expert on Windows running on the same dual-boot notebook). In addition to using utilities to run security checks against your Internet-connected servers, a Linux system located in your DMZ could also run a free IDS (Intrusion Detection System) application like Snort full time. (We show you how to set up and test Snort on the Snort page.)

Most of the free utilities are available as Debian packages so installation is a snap and any that aren't can be compiled from the available source code. Two good books that detail available free utilities, as well as how to use them, for network monitoring and security testing respectively are:





The "Maximum Linux Security" book will help you in setting up a garantir DMZ-connected system. You wouldn't want your security monitoring system to itself become the victim of a hacker.

Also, check out our Network Monitoring page !

Shell Scripting Top of page

For my money shell scripting is one of the most fun and interesting things to play around with because it is the key tool for automation. Due to of the dominance of GUI interfaces in recent years, which require you to manually supply inputs in the way of mouse clicks, etc. to execute most OS commands, utilities, and programs, the benefits of scripting are pretty much unique to the Linux/UNIX world.

Shell scripts are analogous to DOS batch files. That is, shell scripts are simply text files (created with any text editor) that contain a series of commands. These commands can be Linux OS commands, commands that run programs, commands that "call" other scripts, or any combination of these. That way you just execute the script every time you want to accomplish a task or process rather than typing in all the commands by hand every time. (If you're experienced with DOS, you may want to check out www.tldp.org/LDP/abs/html/dosbatch.html for a comparison of DOS-to-Linux batch file statements and shell commands.) As such, the various shells in Linux are not only user interfaces but kind of like programming languages as well. The Korn shell is considered the best shell for programming on UNIX systems and the Linux Bash shell incorporates many of the Korn shell's functionality.

Anything you can type in at the shell prompt can be put in a shell script and there are additional scripting-specific commands for condition testing and control of the logical flow of a script. When used with other automation tools, someone who is good at writing shell scripts can accomplish some amazing things. These other tools include:

  • cron – The cron scheduler can be used to schedule the routine execution of scripts at a given time or day. (We cover the use of cron on the Security page.)
  • Perl scripts – A shell script can call a Perl script. Given that Perl started out as a reporting language, it has extensive capabilities for working with both string and numerical data in text files. (Perl is are used heavily in CGI scripts on Web servers and is a very easy language to learn.)
  • Regular expressions – Commands used to parse text strings (such as user inputs, e-mail messages, or the output of other commands, scripts, or programs) looking for matches and optionally performing substitutions.
  • La redirection – Redirecting the input or output of a command, script, or program to an alternate device or process.
  • Piping – Using the output of one command, script, or program as the input for another (i.e. "chaining" the execution of programs).
  • Custom programs – Custom-coded compiled programs that can be executed from a shell prompt to perform tasks with proprietary data files or hardware.

When used in combination, these tools allow you to develop total end-to-end automation of business processes limited only by your imagination. It's like having a giant puzzle with thousands of different pieces (the commands and tools) that you can use to put together the solution you need. The really neat thing is you also have the ability to make your own custom puzzle pieces when needed using Perl scripts or custom programs.

Most Linux shell commands, as well as many utilities and programs written for Linux, have a number of command-line options (aka "switches") that allow you to customize the behavior of the command or utility. Some of these switches can be useful when the commands, utilities, and programs are used in an automated fashion. When combined with redirection and piping, a single line in a shell script can accomplish a lot of work.

Other programs have optional configuration files that can be created to enhance the automation capabilities of the command. For example, you can create a .netrc configuration file for the ftp shell command which contains login, server, and file location information as well as ftp program commands (get, put, lcd, etc.) allowing you to totally automate file transfers. By default the .netrc file is stored in the home directory of the user who creates it as a means of restricting read access to it because it can contain a clear text password. (We use the ftp shell command interactively on the Compiling Software page.)

Shell scripts which use the iptables OS command to turn your Linux system into a proxy server or firewall are given on the Proxy/NAT and Firewall pages respectively. However, these are relatively simple examples which perform only a few functions. (The comment lines in the scripts provide some information on the purpose of the commands.)

Try and get into an automation frame of mind. As you use your computer to do things, ask yourself if the steps you are performing could be automated. As you learn more about Linux and its commands, take note of any commands that would be beneficial to you in your automation needs so you can use them in a future shell script. Keep in mind that, because shell scripts usually contain some Linux OS commands, the better you know these commands the better scripts you'll be able to write.

Multi-User Top of page

Like other server operating systems, by default Linux and UNIX operate as "multi-user" operating systems. For example, if you put a Linux box on your network, multiple people can simultaneously use their networked Windows PCs to open up a telnet session to the Linux server. Each person would get their own terminal session (i.e. their own shell prompt with the ability to execute whatever shell commands they wish).

However, not just anyone can do this. Only those that have an "account" on the system can access it. You create an account on a Linux system for someone by entering a login ID (aka "user name") and password for them. This is why the first thing you see when you boot up (or telnet into) a Linux or UNIX system is a login prompt. You have to let the operating system know which user desires access so it can put the appropriate restrictions in place. (For example, most user accounts can't modify or delete the operating system files.)

As mentioned earlier, when you log into a system using the user name racine you can access/modify/delete anything and everything because racine est le super-user account on Linux and UNIX systems. le racine account is created automatically during the OS installation. When you install Debian, you are asked for a password for the racine account and you are asked if you want to create any additional user accounts at that time. You can create accounts for other users after the installation also and you typically use the racine account to do this. You also typically use this account to install software and edit the OS and application configuration files (which, again, are usually just text files that you modify using a simple text editor).

Even if you have a stand-alone Linux system you can use this multi-user capability. When the system boots up and presents you with a login prompt, you're actually using only the first of several available terminal sessions. Once you log in, simply hold down the Alt key on your keyboard and press the F2 key. You'll see another login prompt. This is the second terminal session. You can log in here using a different user name. Do an Alt-F3 and you'll yet another login prompt. These type of terminal sessions are also called "consoles" or "virtual terminals". Using multiple consoles, logged in as racine on one and some other user on another, is helpful when you want to adjust the level of access to certain files or directories for users. You can adjust the file permissions using the racine console and test the effects of the adjustment by switching over to the "regular" user's console.

And this multi-console capability is not limited to virtual terminals. You can connect dumb terminals to the serial ports of the Linux PC and simply uncomment a couple lines in the /etc/inittab configuration file to get them to bring up their own console sessions. Instead of dumb terminals you could also use PCs running a terminal program like HyperTerm to connect a serial port on the terminal PC to a serial port on the Linux PC. (A PC-to-PC connection would require a null-modem cable. Dumb terminals may or may not need a null-type cable depending on their interface.)

Some user accounts are set up automatically for certain services instead of users. For example, if you set up a Linux system as an FTP server, a user account with the user name ftp est créé. Anyone who uses "anonymous FTP" to access the server is doing so using this ftp user account.

Files and Such Top of page

Before getting into files there is one très important thing you must know about Linux/UNIX:



Linux/UNIX IS case-SENSITIVE !!!


When you see examples of commands, etc. on these pages, they must be entered exactement as shown. Par exemple, un -f will have a totally different meaning than a -F in a Linux/UNIX command. Case-sensitivity also applies to passwords and file names. All of the following file names would be différent files under Linux/UNIX:

Linux/UNIX treats tout comme un fichier. When it's writing to your screen it thinks it's just writing to a file. When it sends data through a modem it thinks it's just writing to a file. As a result, all your hardware, including ports, hard-drives, video cards, etc. on your system must be represented somehow somewhere in the file system. Off of the root of the file system is a directory called /dev as in "devices". In this directory you will find a lot of different files all relating to hardware. These files are device drivers, not unlike the device drivers you use with Windows. It's the device driver file that handles the communication and data transfer with the actual piece of hardware.

With newer versions of the Linux kernel, hard-drives and their partitions are represented by files in the /dev directory with names starting with Dakota du Sud and optical read-only drives with names starting with sr. The drives are identified by letters (a, b, c, etc.) and the partitions on each drive are identified by numbers (1, 2, 3, etc.). For example, the second partition on the third hard drive would be identified as sdc2 in various linux commands.


Drive

Partition

Linux ID

Premier

Premier

Dakota du Suda1

Premier

Second

Dakota du Suda2

Second

Premier

Dakota du Sudb1

Second

Second

Dakota du Sudb2

CD/DVD

n / a

sr0


When we install Debian on our Installation page we create a swap partition for virutal memory (similar to a paging file in Windows) and the remainder of the hard-drive is used as the root partition for lcoal storage. As a result we end up with partitions sda1 et sda2 ainsi qu'un sr0 "partition" that represents an optical disc in a CD/DVD drive. You can see what partitions are defined on a system with the command


cat /proc/partitions


Older Linux kernels identified SCSI hard-drives using the designations given above. However, IDE drives like those found in most older PCs were identified a little differently. If you're not aware of it, most systems have two IDE "channels", primary and secondary. Each channel can have two hard-drives attached to it, one "master" and one "slave" (which is why you have to look at the jumpers on IDE hard-drives when you install them). Linux refers to these drives this way:


Channel

Drive

Linux ID

Primary

Maîtriser

haute définitionune

Primary

Slave

haute définitionb

Secondary

Maîtriser

haute définitionc

Secondary

Slave

haute définition


So with the primary/secondary and master/slave arrangment you can have a maximum of four drives, including CD/DVD drives, in any combination. As with the newer kernel drive designations given earlier, if you have multiple partitions on a single physical drive, each partiton is given a number which is appended to the above drive designation. For example, if you had three partitions on your first hard-drive, you would have hda1, hda2, and hda3.

Keep in mind that this is only for older versions of Linux. Newer versions identify IDE drives with the same Dakota du Sud designation that SCSI and SATA drives are identified with.

Newer versions of Linux also do a pretty good job of auto-mounting CDs and DVDs when they're inserted into optical drives. However, if you run across a case where that doesn't happen don't automatically assume the disc is bad. You could try manually mounting the disc. If you have a newer Linux system where the optical drive has the sr designation you would enter the command:



mount -t iso9660 /dev/sr0 /media/cdrom


I know this looks a little cryptic at first but it's really quite simple.

  • monter fait un dispositif part of the file system.
  • -t iso9660 specifies the format of the file system being mounted. (The iso9660 is the standard format for data CDs and DVDs.
  • /dev/sr0 is the path to the DVD-ROM drive's device driver file. For IDE interfaces you would use /dev/hdc when the optical drive is the premier hard-drive on the secondaire IDE channel.
  • /media/cdrom is the directory to "map" the device to in the file system so it can be accessed. This has to be an existing directory but it can actually be any directory you want. You could use the mkdir command to create a directory called "shiny-spinning-thing" off the root of the file system and replace /media/cdrom avec /shiny-spinning-thing in the above command if you wanted to.

Using the above monter command simply maps the CD/DVD drive to the /media/cdrom directory (which was created during the installation). The directory a device gets mapped to is called the "mount point". As such, in order to access the files on a CD or DVD once it's been mounted you just go to the mount point its been mapped to by entering



cd /media/cdrom


et utiliser le ls command to view a list of the files on it.

Be aware of a very important distinction. Mounting is the process of making an available drive/partition part of the Linux file system. You can have drives or partitions that are available but are not a part of the file system. This is seen clearly when you insert a USB stick into a system running a newer Linux kernel such as Debian Jessie (8.x). The device will be recognized as the "next" drive, being drive sdb with patition sdb1 if you only have one hard-drive (sda) in the system. (You can see this by entering the above chat command.) However, it won't get mounted to a directory in the file system. As a matter of fact, in the Debian Jessie installation routine we used there isn't even a directory for a USB drive. We have to create the mount point (directory) ourselves and mount the USB drive manually with the following commands:

cd /media
mkdir usb
mount -t auto /dev/sdb1 /media/usb
ls /media/usb

Because USB sticks can be formatted with different file systems you'll want to use the 'auto' parameter when mounting them.

Other Linux distros and UNIX more often put mount point directories under the /mnt annuaire. In order to mount a DVD drive on these systems you simply change the target directory in the command:



mount -t iso9660 /dev/hdc /mnt/cdrom


Just as you mounted the USB stick or optical disk to access it, you have to unmount it when you are done. Pressing the eject button on the CD/DVD drive won't open the tray until you unmount the disc. For this you just use the démonter and specify its mount point in the file system. Par exemple:


umount /media/cdrom


Another thing to note about dealing with files in Linux/UNIX is that file extensions mean nothing to the OS. Recall that, as a carry-over from DOS, many files in Windows have a three-character file extension and that this extension is separated from the file prénom by a period when the file is specified (ex: word.exe). Windows knows a file is a program ("Application") type of file because it has a .EXE extension. In Linux/UNIX there are no extensions. The file name can contain periods but what comes after the period is not an extension to Linux/UNIX.

Note that some Linux/UNIX applications may use a certain set of characters after a period in the file name to specify their data files. For example, the Apache Web server software looks for files that end with .htm, .html, et .shtml and these could be thought of as extensions. Technically however, they're not. And to the Linux/UNIX OS they mean absolutely nothing.

You could name a file this.is.a.file if you wanted to. It's all the same to the OS. So how do you tell Linux/UNIX that a file is a program (application)? Linux/UNIX has a set of "permissions" for each file. These permissions are lis, écrire, et exécuter. You simply grant the exécuter permission to a file that is a program or script. You could grant the exécuter permission to a file that's not a program or script, but since the OS will try and execute whatever statements are in the file as if they were shell script commands, you'll likely end up with a lot of error messages. Depending on what's in the file, you could also end up with disastrous results like a trashed hard-drive.

I won't go into permissions in detail here. It's one of the key points to learn about the Linux/UNIX OS and just about every book on UNIX or Linux covers it. I just wanted to make you aware of them and how they relate to the way you can name files. If you're a Webmaster you may have already worked with permissions. When you use an FTP program to set permissions on CGI scripts and their data files you are using the Linux/UNIX chmod command that sets file permissions.

In DOS you used the dir command to list files on a drive or in a directory. In Linux/UNIX the ls command without any parameters gives a very simple file listing which doesn't even indicate which items are directories and which are files. To get a good detailed listing you need to use ls -laF at the shell prompt which will produce a result like this:





drwxrwxrwx   3 keith    web    4096 Aug  8 03:59 ./
dr-xr-sr-x   3 keith    web    4096 Aug  6 13:56 ../
-rw-r--r--   1 keith    web   17181 Aug  6 16:04 bdl21dlx.zip
-rwxr-xr-x   1 keith    web   15818 Aug  6 16:04 bdlogger.cgi*
-rw-r--r--   1 keith    web       1 Aug  6 16:04 history.log
-rw-r--r--   1 keith    web       1 Aug  6 16:04 pagehits.cnt
-rw-r--r--   1 keith    web       1 Aug  6 16:04 period.log
-rw-r--r--   1 keith    web   30586 Aug  6 16:04 readme.txt
-rw-r--r--   1 keith    web       1 Aug  6 16:04 trigger.dat
drwxrwxr-x   2 keith    web    4096 Aug  8 03:59 zips/      



le / after "zips/" indicates it's a directory (as does the "d" in the first column of the permission block on the left). le * après le bdlogger.cgi file name indicates it's flagged as executable. le -rwxr-xr-x (which is 755) in the permission block for the bdlogger.cgi file also indicates that it's flagged as executable (X).

Also be aware that Linux/UNIX does use the period in file names for one special circumstance. File names that début with a period are usually configuration files. Normally every user will have a file called .profile in their home directory on a Linux/UNIX server. In this file are commands which set up the user's environment (default shell, values for environmental variables, etc.). le vi text editor has its own configuration file. So do the character-based versions of telnet et ftp that come with Linux/UNIX and using their configuration files allow you to automate the use of these programs. (For example, you could set up an ftp profile file and use the cron memory-resident scheduler to kick off ftp and automatically download a log file from your Website every night.) If you just use ls to list files, the files that start with a period do ne pas get displayed (which is another reason to use the ls -laF command).

Speaking of home directories, every time a user account is created a home (personal) directory is also created for them. The home directory will have the same name as the username and it's located under the /home annuaire. If you want to return to your home directory from anywhere in the Linux/UNIX file system, just type in cd and hit Enter.

It takes awhile to learn the Linux file system structure and that can make finding certain files a tough proposition. Luckily there are two commands you can use to locate files.

Windows systems have an environment variable called the "path". The path is just a list of directories (folders) that is searched for .EXE (program) files. If you tried to run a program by typing it's name at a command prompt, the Windows PC would look in the current ("working") directory first. If it didn't find the program there it would read the path and start looking into each one of the directories specified in the path trying to find the program's .EXE file. If it found it it would run it. If it didn't find the file it would return the all-too-well-know message:



Bad command or file name


The file could have been on the drive somewhere, but if it wasn't in the current directory, or any of the directories listed in the path, you got the message.

Linux/UNIX has a path too. (Actually, each user that logs into the system has their own path that they can tailor to their needs.) The directories in the path are those that are the defacto standards for storing program files. The standard directories for storing executable binary files are:

le whereis command will search the directories in the path and tell you if the file you specify is in any of them, and if so which one.

whereis ls

résultats

ls: /bin/ls

meaning the

ls file is in the /bin annuaire. If it couldn't find ls it would simply return:

ls:

whereis is only good for finding out which directory in the path files (typically program files) are located. It also may not work on UNIX machines (try the lequel command on those).

You may get back several paths which indicates that a program (usually different versions of it) are installed in different places. For example, often times Web hosting companies will have two installations of the Perl interpreter on their Web server systems to support a wider range of CGI scripts. However, the list just shows you where the multiple copies are located. If you simply type in the name of the program at the shell prompt you won't know which one is actually getting executed. For that you have to look at the order of the directories in the path. Remember that the system goes through the directories in the order listed in the path running the program from the first directory where it finds the file. To see the path, use the command:



echo $PATH


To find any kind of file (not just program files) anywhere on the hard-drive (not just in the path), use the trouver command. With this command you specify a starting point and the name (or partial name) of a file. For instance, if you wanted to search the entire hard-drive you'd specify the root of the file system as the starting point like so:


find / -name 'ls'


If you're in a directory and you just want to find out if the file is in the current directory or any of its sub-directories you'd use:


trouver . -name 'ls'


le . (single period) in Linux/UNIX is like shorthand for "the current directory" and can be used in commands. Two periods (..) means the parent directory (one level up) and can also be used in commands (so you don't have to type in the entire path).

If you want to find out how much hard-drive space your files are taking up, use the:



df


command. le Use% figure will tell you. NOTE that the numeric values given are for 1-Kbyte blocks, not bytes.

le chat command is the equivalent of the DOS type command. It types out the contents of a file to the screen. You don't want to chat a binary file to the screen because you'll just get a bunch of garbage on the screen accompanied by a lot of beeping and possibly totally hose up your display. Use it with text files seulement. However, if a file is longer than 25 or so lines only the last 25 lines in the file will be displayed. The rest just scroll off the top of the screen. Better to use the plus command which does the same thing, except it pauses the display every 25 lines so you can get a look at what's in the file. Press the Space Bar to get the next screen-full. Pressing the Enter key will advance the display one line at a time.

One of the keys to maximizing the automation capabilties is the ability to "chain" the execution of programs. The output of one program can be "piped" into another for it's execution. A simple example of this is:



ls | plus


If you use the ls to look at a list of files in a directory which contains a lot of files, you'll miss most of them as their names scroll off the screen. By piping the output of the ls command into the plus command the list of file names will get paused. The pipe symbol ( | ) is usually the Shifted character over the key on most PC keyboards.

This is a very simple example. You can do some major automation once you get good with Linux commands. (Also check out the grep et Trier commands to add to your bag of automation tricks.)


Where to learn more – The best of our bookshelves:
The Linux Cookbook" hspace="3" vspace="3
More info…

The Linux Cookbook is based on the Debian distro. It is a good introductory book that could be considered a Linux "Owners Manual" because it covers the operation of the OS but never gets under the hood (doesn't get into the server or networking aspects of Linux). It teaches you how to use the OS. (The sub-title is "Tips and Techniques for Everyday Use".) Thankfully, the majority of the book covers the use of commands at the shell prompt. There are 32 bite-size (10 to 15 page) chapters, each containing a lot of short recipes on how to accomplish specific tasks. No less than eight chapters deal with working with text, which is criitcal if you want to get good using Linux/UNIX. Use of some GUI apps for graphics, etc. are also covered. The "Productivity" section has five chapters which present a lot of good info on disks, printing, and working with other platforms.

Another useful tool for automation is the "redirect". Things that normally get displayed on the screen (which is the default output device) can be redirected to a text file or to a device like a printer or modem (which Linux/UNIX thinks are just files). The greater-than sign (>) is used to redirect output. For example, if you wanted to redirect your file listing to a printer you'd use:



ls > lp0


Another painfully simple example but you'll likely see these two characters in example commands so you should know what they're doing. Using piping and redirects in conjunction with the wealth of Linux/UNIX commands available will allow you to set up a system that'll do everything but make coffee (and I wouldn't doubt some engineering student somewhere got a Linux system to do that too).

Linux/UNIX file systems support things called symbolic links, more commonly referred to as "symlinks". These are the equivalent to shortcuts on Windows systems. They are most often used to create symlinks to binary executable files and data files so that they appear to be located in many different areas on a hard-drive. However, you can also create symlinks to entire directories so that these directories (and their contents) are accessible via different locations within the file system (for example, in the home directories of certain users). The advantage of symlinks is that any changes that need to be made only need to be made to the one file or directory that all the symlinks point to rather than having to make changes to multiple copies of the same file or directory.

There are actually two types of symbolic links, hard and soft with soft symlinks being much more common. The Windows shortcut analogy refers to soft symlinks. Hard symlinks create an actual copy of the file of directory. Lorsque vous utilisez le ls command to look at a list of files in a directory, you can tell which ones are symlinks because they'll use the -> characters to point to the original file. As you'll see in below, symlinks are commonly used in the startup directories. When a system is started at a particular runlevel it runs the boot-up shell scripts located in the startup directory for that runlevel (each runlevel has its own directory). Many scripts are run no matter which runlevel is used. Instead of putting copies of these scripts in all of the runlevel startup directories, all the scripts are put in one directory and only symlinks are put in the individual runlevel startup directories.

For example, the shell script to start up the cron background scheduler is called cron and it's run at all runlevels. It is located in the /etc/init.d directory which holds all the startup scripts ("init.d" is the geek abbreviation for "start daemons"). If you were to use the ls command to look at the files in the startup directory for runlevel 2 (rc2.d), you would see a soft symlink to the cron startup script:



S89cron -> ../init.d/cron


Again, the advantage is if changes would need to be made to the cron script one would just edit the actual script file and they would take affect at all runlevels. (It's also a good way to cut down on disk space usage.) One important point to note is that even symlinks have to have file permissions set on them. They do not "inherit" the permissions of the file they point to. If a symlink points to an executable shell script, the symlink itself must also have the eXecutable permission applied to it.

Source and Binaries Top of page

Linux, like every other OS, works with two les types of files, binaire et texte. Binary files appear as gibberish to us mere mortals. They can be programs or data files written by programs or the operating system. Text files are those that can be read by us human beings. We can view and change them using any text editor (like Notepad in Windows).

The files that Linux, and every other OS, works with can fall into one of two different catégories, programmes ou Les données. Either a file contains a set of instructions to be executed by the CPU (a program) or it contains information (data). Program (or "application") files can be anything from OS commands to a word processor. Data files can hold information for programs (like configuration information) or for us humans (like a word processing document or some database).

The above two categories are admittedly broad, but it helps to think of all files as fitting into one or the other category. There is no relationship between types of files and categories of files. To illustrate this, consider the following:

  • Binary files can be programs (like .EXE files on a Windows)
  • Binary files can be data (like graphics files created using a program like Paintbrush)
  • Text files can be programs ("script" or "batch" files that typically contain a series of OS commands)
  • Text files can be data (Linux makes heavy use of text files to store configuration information for programs and programs like Excel can "export" data to a text file)

Most programmers would probably whince at referring to a text batch file as a "program", but they do contain a series of commands that are executed by the CPU so for categorization purposes they fit the bill.

You can't tell just by looking at an ls listing what types the files are. The Linux fichier command will tell you:



file /bin/ls


If a file is a binary file the fichier command will return Les données or a long string with something like ELF 32-bit somewhere in it (ELF stands for Executable and Link Format). If a file is text it will return a short string with the word texte in it.

The Linux operating system actually comes in two forms. le binaires are the pre-compiled, ready-to-run OS files that you install on your PC, similar to installing the Windows OS. In addition, the "open source" nature of Linux means that the code source files of the operating system (what the programmers wrote) is also freely available. Source code files are text files. A programmer types programming statements into a text editor, saves the text file, and then "compiles" it to generate a binary file which is the equivalent of a Windows .EXE file.

Someone who is good at C programming (the language Linux is written in) can open one of the Linux source code files in a text editor, customize it to add special functions or otherwise tailor it to their needs, and then recompile it. Conversely, the source code for Windows is a closely-guarded secret and the Windows DVDs you buy from Microsoft only contain the binaries. (Now you know why the term "open source" is often used to refer to Linux and Linux applications.) As a result of this, Linux is also a fully personnalisable operating system. If you don't like the way Linux does something, you can change it any way you want by altering the source code and re-compiling it. That's one reason "embedded" Linux is often found serving dedicated functions controlling devices like the TiVO DVR (Digital Video Recorder).

The open source nature of Linux and open Linux applications also keeps people honest because anyone can view the source code and see exactly what a program is doing (the "many eyes" theory). The closed source nature of Windows and Windows programs does not offer this benefit. When you go to microsoft.com and use the Windows Update feature, you have no way of knowing what is actually being checked or what information the update application is extracting from your system. Only a select few at Microsoft know this and they ain't talkin'.

All source code files (not just Linux source code files) can be converted into the executable binaries by compiling them. In the Linux/UNIX world you will often see applications and utilities distributed in source code (text file) format. This is because there are many different "flavors" and versions of Linux and UNIX to run on the wide variety of hardware platforms out there. The source code for an application or utility compiled on one Linux/UNIX system will generate a binary file that may not run on a system running a different flavor of Linux or UNIX. Compiled binaries may also be platform-specific. This is why you'll see different Linux disc sets offered for different hardware platforms (i386-Intel, m68K-Mac, Sparc-Sun, ppc-PowerPC). Windows is only compiled to run on the Intel (and compatible) platform. So Linux gives you the advantage of being able to run the same OS on all of your different hardware platforms, including S/390 mainframes.

So the person or company that wrote an application or utility has two choices. They can either make a wide variety of binaries available for all of the different flavors of Linux/UNIX (which means they would have to have a wide variety of machines and compile it on each one of them), or they can just make the source code available and let the users compile it themselves on their particular machines. That's why many flavors of Linux and UNIX include a C compiler, and why many free Linux/UNIX applications and utilities are only available in source code format. Debian makes pre-compiled binary disc sets available for a wide variety of hardware platforms and also has an on-line repository of the source code files of not only the Debian operating system but all of the applicatons and utilities included with it.

Packages and Tarballs Top of page

Using a C compiler to generate binaries from source files is often one of the more frustrating things about learning to use Linux/UNIX. There are as many different C compilers out there as their are flavors of Linux/UNIX and some work better than others. This frustation is what led to the development of paquets. Instead of manually compiling and copying all of the files associated with a new application into the appropriate directories, a "package manager" is used to help automate the process. Red Hat developed the Red Hat Package Manager which uses .RPM files, and Debian has a package manager that uses .DEB files. (We show you how to work with Debian packages on the Packages page.) Many feel the Debian package manager is easier to use, and it allows you to pull packages and package updates over the Internet.

This doesn't mean you want to restrict yourself to packages entirely. There are many good utilities out there that do not come in a package format. There are a lot of Web sites that offer Linux/UNIX utilities for download. When you go looking for a particular utility, check to see if it's available as a binary for your flavor of Linux/UNIX. If not, the source will be available.

The files you actually download will typically be compressed into an archive, much like PKZip or WinZip files you can download for Windows systems. There is even a zip-like program for Linux/UNIX called gzip (GNU zip). (Most Linux and UNIX distros include the gzip/gunzip utilities.) gziped files typically have .gz at the end. The command to uncompress and extract a gzip-ed file is:



gunzip file-name.tar.gz


PKZip and WinZip do two things. Ils combiner multiple files into a single archive and then they compresse il. With Linux/UNIX this is a two step process. gzip handles the compression and le goudron handles the combining. tar is the utility that combines/extracts multiple files but it doesn't do any compression. Some download files aren't compressed because they're not all that big. If the file you download is an ONUcompressed archive of multiple files, it will likely have a .tar extension. Such files are called "tar balls". The command to extract a tar ball is


tar -xvf file-name.tar



One thing to note about tar is that it maintains the directory tree structure during extraction if subdirectories are included in the combining process.

A file that has been combined and compressed may have two "extensions". If you see a file name that ends in .tar.gz ou simplement .tgz you have to first gunzip it, which will remove the .gz from the end of the file name. Then you extract that file using tar.

Newer versions of tar can handle both the uncompressing and extracting. If you have a file with a .gz extension try entering this command:



tar –zxvf file-name.tar.gz


Le supplément z switch will uncompress the file if you do have a newer version of tar.

Don't be shy about un-tar-ing and compiling source files. They are valuable skills to have in the Linux/UNIX world. Many device drivers are only available as source code files. We'll show you how to compile a chat application and a driver from source code on the Compiling Software page.

Starting Up Top of page

The discussion below is of the legacy SystemV init system. Starting with Jessie (v8),
Debian has switched to the Systemd init system. Information on systemd can be found here.



All of the Linux distros and flavors of UNIX can be grouped into two families due to the evolution of UNIX; "SystemV" (System Five) and "BSD". This knowledge is useful only in that the two families use different directory structures for their startup files, and you'll want to know what files are used during the startup process so you can set certain processes to start up automatically when the system boots up.

Debian and most other Linux distros are part of the System V famille. A couple releases back Sun Microsystems changed their Solaris operating system to be a part of the System V family also. As a result, knowing this startup directory system structure is useful for most Linux/UNIX systems. There may be some variations in directory names, etc. among different distros but the concept is the same for all.

When you boot your system, services and processes are started via shell scripts. All shell scripts that could possibly get executed when you boot your system are stored in the /etc/init.d sub-directory. (Note that even directories can have periods in their name.)

In order to understand the boot-up process you have to be familier with runlevels. Linux/UNIX systems can be set to run in different modes of functionality. They can operate in a single-user mode, such as in the case of strictly being a "workstation" (desktop PC), or they can run in multi-user mode to operate as a server. Each runlevel is identified by a single-digit number. The runlevels worth remembering are:

0 – shut down the system
1 – single-user mode
2 – 5 multi-user mode
6 – reboot

Runlevel 2 is Debian's default. Having several different multi-user runlevels means that you can customize them. For example, you could disable NFS file sharing in runlevel 2 because that's not something you want enabled on an Internet server. If you're planning on setting up a file server for your internal network, you could then change the default runlevel to 3 which would still have NFS file sharing. Initially there's no difference between the four multi-user runlevels because they're all set up the same (all start the same services during bootup).

You can change to different runlevels on the fly using the init command followed by the desired runlevel. This can be useful, for example, if you wanted to restart the system remotely. You couldn't use the Ctrl-Alt-Del key sequence to restart a system you were connected to via a telnet session. Instead you would just use the init 6 command. Of course, doing so would disconnect your telnet session, but you could telnet back in once the system has had a chance to reboot.

Recall that any shell script that might be run at system startup are stored in the /etc/init.d annuaire. All these different runlevels do is run a different set of the scripts stored in this directory at startup. When the system boots up the first startup file it reads is the /etc/inittab text file. This file basically tells the system what the default run level is via the line



id:2:initdefault:



This is the line in the /etc/inittab file you need to edit if you want to change the default run level. Most distros default to runlevel 3 which is not a secure thing to do for Internet servers.

Each runlevel also has it's own subdirectory under the /etc directory, and the subdirectory name contains the runlevel number. The naming convention for these subdirectories is:



rc2.d


with the runlevel represented as the number (in blue) above.

These runlevel subdirectories don't actually contain any scripts. Rather, they all contain symbolic links to the scripts in the /etc/init.d subdirectory. This is so all the different runlevels can share common scripts eliminating the need to have multiple copies of the same script in multiple runlevel subdirectories. (That's why any script that could be run at startup is saved to the /etc/init.d subdirectory.)

Initially (on a Debian system), all the different runlevel subdirectories contain the same set of links to the same scripts in the /etc/init.d subdirectory. As a result, the system is functionally the same no matter which multi-user runlevel is chosen. You customize the system's behavior for each runlevel by adding and/or deleting links in the different runlevel subdirectories.

For example, if you want runlevel 2 to be for Internet services, you could go into the /etc/rc2.d subdirectory and delete the links to the NFS scripts. Then you could go into the /etc/rc3.d subdirectory and delete all the links to the Internet services scripts (like Apache, Sendmail, and inetd) so that runlevel 3 was set for network file sharing.

It all seems confusing the first time you find out about it. Here's a diagram of the process. Note that special single-user runlevel is always run at bootup to set up the basic system. The higher runlevel scripts are additionally run to provide the multi-user/server functionality.



Linux startup process


There's another reason for using links in the individual runlevel subdirectories. These links use a special naming convention to indicate when they should be run and in what order they should be run. Links that have names starting with an upper-case S are called when the runlevel is entered (starting). Links that have names starting with an upper-case K are called when the runlevel is exited to Kill services. (Due to this naming convention it is more common to simply rename a symbolic link so that it begins with a dash (-) or underscore (_) rather than delete them when customizing a runlevel.)

The directories for the multi-user runlevels only contain links that start with an S. Only those run levels that deal with shutting down or restricting functionality of the system (0, 1, 6) have links that start with a K to kill services.

le Nombres after the leading S or K determine the order in which the links are called, lowest number first. This is important for process dependancy reasons. For example, you wouldn't want to start up the Samba service if the networking service wasn't already running. Par exemple:

S20thisservice
S30thatservice
S40anotherservice
S80yetanother

You'll see how to add your own script to the startup process near the end of the Proxy/NAT page. When you add a link to one your scripts you typically use a high number (70s and above) to make sure everything your script needs is already running.

Shutting Down Top of page

Vous ne peut pas just turn off a Linux system like you would a DOS system. It has to be "shut down". If you want to turn the system off, there are several shutdown commands you can use but with most Linux distros (most UNIX flavors don't support this) I find it much easier just to hit Ctrl-Alt-Del. Unlike a DOS system, doing this will not immediately reboot the system. It will first shut down all processes and dismount the file systems. Once it starts to reboot you can turn the system off.

If you want to keep the system running but not be logged in (as in the case of using the system as a server), just type in sortie at the shell prompt. This will log you out and return to the login screen.

Remarque: Vous devriez jamais leave an Internet-connected server console logged in as anyone, especially root.

The Kernel Top of page

As mentioned early on in this page, the kernel is the guts of the operating system. It's the executable file that contains the main OS code. Every operating system has a kernel. The various distributions all use the Linux kernel.

New and impoved versions of applications are released with increasing major version numbers (ex: Firefox 38, Firefox 39, etc.), or minor version numbers (ex: Firefox 38.0, 38.1, 38.2). Similarly, newer versions of the Linux kernel are also occasionally released. Debian 3.1 ("Sarge") used the 2.4 kernel by default while Debian 8.0 ("Jessieh") started using the 3.16 kernel by default.

You should be aware of the kernel version (not just the distro version) you use because procedures for setting up various system functions often change with the kernel versions. For example, the Firewall page covers utilizing IPTABLES, the firewalling utility for the 2.4 and later kernels. (With the 2.2 kernel IPCHAINS is used.)

Because Linux is used a great deal as an operating system for servers, and because servers typically aren't upgraded as often or as quickly as workstations, support (in the way of Web resources, etc.) for older kernel versions is usually available for long periods after newer kernel versions are released. As a result, you don't have to feel rushed to upgrade if you're using an older version of a distro or a distro with an older version kernel.

There's one part of the Linux file system that's not really a file system at all. It's actually a window into the system's memory where you can see what the kernel sees. By using the commands:

cd /proc
ls -laF | plus

you can view the various kernel processes currently in memory. While the listing may show many "files" as having a size of zero bytes, there is actually a lot of information in them. You can see this information by using the usual chat ou plus file commands to view a particular entry's information. Programs will often access information in this directory to read current system parameters and adjust their performance accordingly.

Many Linux books and publications cover recompiling a kernel. You obtain newer kernel source code and compile it into a newer kernel that supports some new hardware or feature. This isn't such a good idea anymore. Many distros customize the kernel a bit and replacing it with a "stock" kernel could cause problems. Plus the fact that you can usually upgrade the kernel using whatever package utility your chosen distro has. If you were put off by the thought of having to recompile the kernel, don't be. In addition, compiling support into the kernel for new devices isn't the preferred way of doing things anymore. These days you want to use modules. We'll get into modules on the Compiling Software page.

Who Da Man ! Top of page

The UNIX and Linux OSs have built-in, on-line help. They're called "man pages". All you have to do is type in homme followed by the name of a command you want help with. Par exemple:



man chmod


However, be advised that these pages were written by the same type of people who wrote the operating system. As a result, they're just this side of being understandable by us mere mortals. But they may help you out in a pinch. When you're done viewing a man page, just hit 'q' to quit.

In addition to man pages, through a volunteer effort the Linux community has produced an extensive list of instructional documents called HOWTOs. There's a HOWTO on just about any subject you can think of. Some of the HOWTOs are not as clear as most would like, but others are quite well written. The central repository for HOWTO documents is at the Linux Documentation Project Web site. A link to this site is given on the Internet Resources page.

Learning Linux isn't easy, especially if you never worked with DOS. And getting good with Linux will take time. However, the popularity of Linux continues to grow. Investing the time and effort to become proficient with Linux could pay huge dividends in the future.

There are a ton of Linux books out there, some of which are featured on these pages. The problem with books for those just starting out is that most beginner books don't get into networking or the server aspects of Linux. Books that cover the networking and server aspects of Linux tend to assume you're well-versed in the use of Linux.

As mentioned on the home page, we'll take the middle ground on these pages. We'll give wide but relatively shallow coverage of things ranging from basic Linux/UNIX commands to setting up a firewalling proxy server. If you go through these pages and follow along configuring your own system, you'll get a decent handle on what it's like working with Linux.



Did you find this page helpful ?
If so, please help keep this site operating
by using our DVD or book pages.

Site, content, documents, original images   Copyright © 2003-2016   Keith Parkansky   All rights reserved
Duplication of any portion of this site or the material contained herein without
the express written consent of Keith Parkansky, USA is strictly prohibited.

This site is in no way affiliated with the Debian Project, the debian.org Web site, or
Software In The Public Interest, Inc. No endorsement of this site by the Debian Project
or Software In the Public Interest is expressed or implied. Debian and the Debian logo
are registered trademarks of Software In The Public Interest, Inc. Linux is a registered
trademark of Linus Torvalds. The Tux penguin graphic is the creation of Larry Ewing.

LIABILITY

IN NO EVENT WILL KEITH PARKANSKY OR BLUEHOST INCORPORATED OR ANY OF ITS' SUBSIDIARIES BE LIABLE TO ANY PARTY (i) FOR ANY DIRECT, INDIRECT, SPECIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF PROGRAMS OR INFORMATION, AND THE LIKE), OR ANY OTHER DAMAGES ARISING IN ANY WAY OUT OF THE AVAILABILITY, USE, RELIANCE ON, OR INABILITY TO USE THE INFORMATION, METHODS, HTML OR COMPUTER CODE, OR "KNOWLEDGE" PROVIDED ON OR THROUGH THIS WEBSITE, COMMONLY REFERRED TO AS THE "ABOUT DEBIAN" WEBSITE, OR ANY OF ITS' ASSOCIATED DOCUMENTS, DIAGRAMS, IMAGES, REPRODUCTIONS, COMPUTER EXECUTED CODE, OR ELECTRONICALLY STORED OR TRANSMITTED FILES OR GENERATED COMMUNICATIONS OR DATA EVEN IF KEITH PARKANSKY OR BLUEHOST INCORPORATED OR ANY OF ITS' SUBSIDIARIES SHALL HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, AND REGARDLESS OF THE FORM OF ACTION, WHETHER IN CONTRACT, TORT, OR OTHERWISE; OR (ii) FOR ANY CLAIM ATTRIBUTABLE TO ERRORS, OMISSIONS, OR OTHER INACCURACIES IN, OR DESTRUCTIVE PROPERTIES OF ANY INFORMATION, METHODS, HTML OR COMPUTER CODE, OR "KNOWLEDGE" PROVIDED ON OR THROUGH THIS WEBSITE, COMMONLY REFERRED TO AS THE "ABOUT DEBIAN" WEBSITE, OR ANY OF ITS' ASSOCIATED DOCUMENTS, DIAGRAMS, IMAGES, REPRODUCTIONS, COMPUTER EXECUTED CODE, OR ELECTRONICALLY STORED, TRANSMITTED, OR GENERATED FILES, COMMUNICATIONS, OR DATA. ALL INFORMATION, METHODS, HTML OR COMPUTER CODE IS PROVIDED STRICTLY "AS IS" WITH NO GUARANTY OF ACCURACY AND/OR COMPLETENESS. USE OF THIS SITE CONSTITUTES ACCEPTANCE OF ALL STATED TERMS AND CONDITIONS.

Click to rate this post!
[Total: 0 Average: 0]

Commentaires

Laisser un commentaire

Votre commentaire sera révisé par les administrateurs si besoin.