Inicio
Al azar
Acceder
Configuración
Acerca de Mexpedia
Aviso legal
Buscar
Edición de «
Shell de Unix
»
Advertencia:
no has iniciado sesión. Tu dirección IP se hará pública si haces cualquier edición. Si
inicias sesión
o
creas una cuenta
, tus ediciones se atribuirán a tu nombre de usuario, además de otros beneficios.
Comprobación antispam. ¡
No
rellenes esto!
{{otros usos|este=el intérprete típico de Unix | terminal (informática) }} [[Archivo:Bash screenshot.png|thumb|300px|Pantalla durante una sesión muestra GNU [[Bash]], tomada en [[Gentoo Linux]].]] Una '''''shell'' de Unix''' es el término usado en [[informática]] para referirse al [[intérprete de comandos]] de los sistemas operativos basados en [[Unix]] y similares, como [[GNU/Linux]], y que es su [[interfaz de usuario]] tradicional. Mediante las instrucciones que aporta el intérprete, el usuario puede comunicarse con el [[núcleo (informática)|núcleo]] y por extensión, ejecutar dichas órdenes, así como [[software|herramientas]] que le permiten controlar el funcionamiento de la computadora. Por ello, en inglés se le denominó así, ''shell'', que puede ser traducido como «cáscara», porque es la envoltura visible del sistema informático. Los comandos que aportan los intérpretes, pueden usarse a modo de guion si se escriben en ficheros ejecutables denominados shell-scripts, de este modo, cuando el usuario necesita hacer uso de varios comandos o combinados de comandos con herramientas, escribe en un fichero de texto, marcado como ejecutable, las operaciones que posteriormente, línea por línea, el intérprete traducirá al núcleo para que las realice. Sin ser un script de shell estrictamente un lenguaje de programación, al proceso de crear scripts de shell se le denomina programación shell o en inglés, ''shell programming'' o ''shell scripting''. En el sentido más genérico del término, ''[[Línea de comandos|shell]]'' significa cualquier intérprete que los usuarios usen para escribir comandos. Su etimología proviene del uso natural de consolas en computadores funcionando bajo unix antaño, cuando los usuarios conectaban al computador central, lo hacían mediante [[VT100|consolas]], (shells) por las cuales a través de un intérprete, hacían inicio de sesión y manejaban la computadora principal. Posteriormente, con la proliferación de los computadores personales y su filosofía monousuario, un computador por usuario (entiéndase lo contrario de la filosofía inicial de Unix, un computador, muchos usuarios conectados por terminales), se desarrolló un software que emulase las características principales de las consolas físicas, a modo de poder seguir usándolas como clientes en un computador o núcleo que comprendiera la convención estándar usada para configurar y llevar a cabo tareas de administración de emergencia con servidores basados en Unix. Los usuarios de Unix y similares, pueden elegir entre distintos shells (programa que se debería ejecutar cuando inician la sesión, véase GNU [[bash]], [[Almquist shell|ash]], [[csh]], [[Zsh]], [[ksh]], [[tcsh]]). Las interfaces de usuario gráficas para Unix, como son [[GNOME]], [[KDE]] y [[Xfce]] pueden ser llamadas ''shells visuales'' o ''shells gráficas''. Por sí mismo, el término ''shell'' es asociado usualmente con la línea de comandos. En Unix, cualquier programa puede ser un shell de usuario. Los usuarios que desean utilizar una sintaxis diferente para redactar comandos, pueden especificar un intérprete diferente como su shell de usuario. El término ''shell'' también hace referencia a un programa particular, tal como el [[Bourne shell]], <tt>sh</tt>. El Bourne shell fue el shell usado en las primeras versiones de Unix y se convirtió en un estándar ''de facto''; todos los sistemas similares a Unix tienen al menos un shell compatible con el Bourne shell. El programa Bourne shell se encuentra dentro de la jerarquía de archivos de Unix en <tt>/bin/sh</tt>. En algunos sistemas, tal como [[Berkeley Software Distribution|BSD]], <tt>/bin/sh</tt> es un Bourne shell o un equivalente, pero en otros sistemas como muchas [[Distribución Linux|distribuciones de Linux]], <tt>/bin/sh</tt> es un [[enlace simbólico]] a un shell compatible con más características (como [[Bash]]). [[POSIX]] especifica su shell estándar como un subconjunto estricto del [[Korn shell]]. == Categorías de shell == [[File:POSIX Shell Command Language.pdf|thumb]] Pueden dividirse en cuatro categorías: tipo Bourne, tipo consola C, no tradicional e histórica. === Compatibles con Bourne shell === * [[Bourne shell]] (sh) -- Escrita por [[Stephen Bourne|Steve Bourne]], cuando estaba en [[Bell Labs]]. Se distribuyó por primera vez con la [[Version 7 Unix]], en 1978, y se mejoró con los años. * [[Almquist shell]] (ash) -- Se escribió como reemplazo de la shell Bourne con [[licencia BSD]]; la sh de [[FreeBSD]], [[NetBSD]] (y sus derivados) están basados en ash y se han mejorado conforme a [[POSIX]] para la ocasión. * [[Bourne-Again shell]] (bash) -- Se escribió como parte del proyecto [[GNU]] para proveerlo de un superconjunto de funcionalidad con la shell Bourne. * [[Debian Almquist Shell]] (dash) -- Dash es un reemplazo moderno de ash en [[Debian]]. * [[Korn shell]] (ksh) -- Escrita por [[David Korn]], mientras estuvo en [[Bell Labs]]. * [[Zsh|Z shell]] (zsh) -- Considerada como la más completa: es lo más cercano que existe en abarcar un superconjunto de sh, ash, bash, csh, ksh, y tcsh. === Compatibles con la shell de C === * [[csh|C shell]] (csh) escrita por [[Bill Joy]], mientras estuvo en la [[University of California, Berkeley]]. Se distribuyó por primera vez con [[BSD]] en 1979. * [[tcsh|TENEX C shell]] (tcsh). === Otros o exóticos === * [[Friendly interactive shell|fish]], una shell amigable e interactiva, lanzada por primera vez en 2005. * [[mudsh]], una shell inteligente al estilo de los videojuegos que opera como un [[MUD (videojuegos)|MUD]]. * zoidberg, una shell modular escrita en Perl, configurada y de operación completamente en [[Perl]]. * [[rc shell|rc]], el shell por defecto de [[Plan 9 from Bell Labs]] y [[Version 10 de Unix]] escrita por [[Tom Duff]]. Se han hecho ports para [[Inferno (operating system)|Inferno]] y para sistemas operativos basados en Unix. * [[es shell]] (es), una shell compatible con RC escrita a mediados de los 90. * [[scsh]] (Scheme Shell) === Archivos de configuración para shells === Un shell lee archivos de configuración en múltiples circunstancias bajo diferentes dependencias de la shell. Esta tabla muestra los archivos de configuración de las shells más populares: {| class="wikitable" || !style="text-align: center;font-weight: bold"|sh !style="text-align: center;font-weight: bold"|ksh !style="text-align: center;font-weight: bold"|csh !style="text-align: center;font-weight: bold"|tcsh !style="text-align: center;font-weight: bold"|bash !style="text-align: center;font-weight: bold"|zsh |- !style="background:#CFCFCF;text-align: left;font-weight: normal"|<code>/etc/.login</code> !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|login !style="background:#CFCFCF;text-align: center;font-weight: normal"|login !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no |- |<code>/etc/csh.cshrc</code> !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|sí !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no |- !style="background:#CFCFCF;text-align: left;font-weight: normal"|<code>/etc/csh.login</code> !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|login !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|sí |- |<code>~/.tcshrc</code> !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|sí !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no |- !style="background:#CFCFCF;text-align: left;font-weight: normal"|<code>~/.cshrc</code> !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|sí !style="background:#CFCFCF;text-align: center;font-weight: normal"|sí !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no |- |<code>~/.login</code> !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|login !style="text-align: center;font-weight: normal"|login !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no |- !style="background:#CFCFCF;text-align: left;font-weight: normal"|<code>~/.logout</code> !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|login !style="background:#CFCFCF;text-align: center;font-weight: normal"|login !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no |- |<code>/etc/profile</code> !style="text-align: center;font-weight: normal"|login !style="text-align: center;font-weight: normal"|login !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|i.login !style="text-align: center;font-weight: normal"|no |- !style="background:#CFCFCF;text-align: left;font-weight: normal"|<code>~/.profile</code> !style="background:#CFCFCF;text-align: center;font-weight: normal"|login !style="background:#CFCFCF;text-align: center;font-weight: normal"|login !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|login !style="background:#CFCFCF;text-align: center;font-weight: normal"|no |- |<code>~/.bash_profile</code> !style="text-align: center;font-weight: normal"|login !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|login !style="text-align: center;font-weight: normal"|no |- !style="background:#CFCFCF;text-align: left;font-weight: normal"|<code>~/.bash_login</code> !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|login !style="background:#CFCFCF;text-align: center;font-weight: normal"|no |- |<code>~/.bashrc</code> !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|n/login !style="text-align: center;font-weight: normal"|no |- !style="background:#CFCFCF;text-align: left;font-weight: normal"|<code>/etc/zshenv</code> !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|sí |- |<code>/etc/zprofile</code> !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|login |- !style="background:#CFCFCF;text-align: left;font-weight: normal"|<code>/etc/zshrc</code> !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|int. |- |<code>/etc/zlogin</code> !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|login |- !style="background:#CFCFCF;text-align: left;font-weight: normal"|<code>/etc/zlogout</code> !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|login |- |<code>~/.zshenv</code> !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|sí |- !style="background:#CFCFCF;text-align: left;font-weight: normal"|<code>~/.zprofile</code> !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|login |- |<code>~/.zshrc</code> !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|int. |- !style="background:#CFCFCF;text-align: left;font-weight: normal"|<code>~/.zlogin</code> !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|no !style="background:#CFCFCF;text-align: center;font-weight: normal"|login |- |<code>~/.zlogout</code> !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|no !style="text-align: center;font-weight: normal"|login |} Explicación: * "no" significa que la shell no leerá el archivo en absoluto. * "sí" significa que el archivo es siempre leído por el shell. * "login" significa que el archivo es leído si la shell es una shell de sesión (loging shell). * "n/login" significa que el archivo es leído si la shell no es una shell de sesión. * "int." significa que un archivo es leído si es un shell interactivo. * "i.login" significa que un archivo es leído si la shell es de sesión interactiva. === Histórico === * [[sh|Thompson shell]] (sh) -- La primel shell Unix fue escrita por [[Ken Thompson]] en [[Bell Labs]]. Distribuida con la versión 1 hasta la 6 de Unix, desde 1971 a 1975. Es considerada muy rudimentaria por los estandarés modernos y no es usada en sistemas actuales. Existen algunas partes disponibles de la misma: [[Ancient UNIX Systems]]. * [[PWB shell]] o Mashey shell (sh) -- Una versión de la shell de Thompson, creada por [[John Mashey]] y otros, mientras estuvieron en [[Bell Labs]]. Distribuida con el [[Programmer's Workbench UNIX]], en 1976. == Shells no Unix == Dentro del conjunto de sistemas operativos [[Microsoft Windows]], el análogo son los programas [[command.com]], o [[cmd.exe]] para sistemas operativos basados en [[Windows NT]], y [[Windows PowerShell]] introducido con [[Windows Server 2008]]. == Véase también == * [[Shell script]] * [[Anexo:Programas para Unix]] * [[Núcleo (informática)]] == Bibliografía == * {{cita libro|título=Unix Shells by Example|autor=Ellie Quigley|fecha=2001|editorial=Prentice Hall PTR|isbn = 0-13-066538-X|capítulo=Introduction to UNIX shells}} — Historia de varios shells, los usos y las responsabilidades de una shell en Unix. == Enlaces externos == * [http://www.shell.ir shell encyclopedia - history, types, definitions, technical information and resources] {{Wayback|url=http://www.shell.ir/ |date=20081205083235 }} * [http://www.freeos.com/guides/lsst/ Linux Shell Scripting Tutorial - A Beginner's handbook] * [http://www.freebsd.org/ports/shells.html www.freebsd.org Lista de shells] {{Wayback|url=http://www.freebsd.org/ports/shells.html |date=20140328103239 }} {{Control de autoridades}} [[Categoría:Software para Unix]] [[Categoría:Terminal de computadora]] [[Categoría:Shell de Unix]]
Resumen:
Al guardar los cambios aceptas los
términos de uso
y liberas de forma irrevocable tu contribución conforme a los términos de las licencias
licencia CC BY-SA 4.0
y
GFDL
. Aceptas igualmente que un hipervínculo o URL es atribución suficiente conforme a la licencia Creative Commons.
Cancelar
Ayuda de edición
(se abre en una ventana nueva)