{"id":2300,"date":"2025-02-05T08:00:00","date_gmt":"2025-02-05T07:00:00","guid":{"rendered":"https:\/\/www.fuhselab.de\/?p=2300"},"modified":"2025-01-08T07:52:13","modified_gmt":"2025-01-08T06:52:13","slug":"shells","status":"publish","type":"post","link":"https:\/\/www.fuhselab.de\/index.php\/2025\/02\/05\/shells\/","title":{"rendered":"Shells"},"content":{"rendered":"\n<p><br>Dieser Artikel liefert einige Grundlagen \u00fcber Shells und dient auch als Vorbereitung auf die kommenden Artikel zu den Shellskripten und der Shellprogrammierung\u2026<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Auch wenn viele Shell-Grundlagen schon im entsprechenden Artikel genannt wurden, hier eine kleine Wiederholung:<\/p>\n\n\n\n<p><strong>Welche Shell wird aktuell genutzt?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>echo $0<\/li>\n<\/ul>\n\n\n\n<p><strong>Die Datei etc\/shells:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>cat \/etc\/shells<\/li>\n<\/ul>\n\n\n\n<p>Im Testsystem werden folgende Shells angezeigt: sh, dash, bash und rbash.<\/p>\n\n\n\n<p><strong>Shell im Terminal wechseln:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>sh<\/li>\n\n\n\n<li>dash<\/li>\n\n\n\n<li>rbash<\/li>\n<\/ul>\n\n\n\n<p>Mit dem oben genannten echo-Befehl kann gepr\u00fcft werden, ob der Wechsel in die jeweilige Shell wirklich geklappt hat. Per exit-Befehl kann die Shell wieder verlassen werden.<\/p>\n\n\n\n<p><strong>Die Bourne Again Shell:<\/strong><\/p>\n\n\n\n<p>Die bash ist die Bourne Again Shell und um diese Shell soll es ab jetzt gehen. Die bash unterst\u00fctzt\u2026<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Variablen<\/li>\n\n\n\n<li>Aliasnamen<\/li>\n\n\n\n<li>Funktionen<\/li>\n<\/ul>\n\n\n\n<p>Der alias-Befehl zeigt alle aktuellen Aliasnamen an. Mit Optionen kann und wird der alias-Befehl dazu genutzt l\u00e4ngere Kommandos abzuk\u00fcrzen\u2026<\/p>\n\n\n\n<p><strong>Die Datei etc\/profile:<\/strong><\/p>\n\n\n\n<p>Die Datei \u201cetc\/profile\u201cwird als erstes ausgef\u00fchrt\u2026 Danach sucht die bash die Dateien .bash_profile , .bash_login und .profile im Heimatverzeichnis des Benutzers. Nur die erste gefundene Datei wird abgearbeitet.<\/p>\n\n\n\n<p><strong>Shell Konfiguration:<\/strong><\/p>\n\n\n\n<p>Hier wird in folgende zwei \u00c4nderungen unterschieden:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Individuelle \u00c4nderungen<\/li>\n\n\n\n<li>Systemweite \u00c4nderungen<\/li>\n<\/ul>\n\n\n\n<p>Umgebungsvariablen werden in der \u201c.profile-Datei\u201c definiert. Aliase werden in der \u201c.bashrc-Datei\u201c definiert. F\u00fcr systemweite \u00c4nderungen gibt es die Dateien \u201c\/etc\/profile\u201c und \u201c\/etc\/bash.bashrc\u201c. Als Alternative bietet sich das Verzeichnis \u201cetc\/skel\u201c an. Alle hier abgelegten Dateien werden als Rohger\u00fcst f\u00fcr den Benutzerordner eines neuen Benutzers \u00fcbernommen\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dieser Artikel liefert einige Grundlagen \u00fcber Shells und dient auch als Vorbereitung auf die kommenden Artikel zu den Shellskripten und der Shellprogrammierung\u2026<\/p>\n","protected":false},"author":1,"featured_media":791,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[21],"class_list":["post-2300","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux-gruppe-peine"],"_links":{"self":[{"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/2300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/comments?post=2300"}],"version-history":[{"count":1,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/2300\/revisions"}],"predecessor-version":[{"id":2301,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/2300\/revisions\/2301"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/media\/791"}],"wp:attachment":[{"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/media?parent=2300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/categories?post=2300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/tags?post=2300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}