« Bash Shell » : différence entre les versions
Aller à la navigation
Aller à la recherche
m (→Features) |
m (→Features) |
||
Ligne 39 : | Ligne 39 : | ||
</pre> | </pre> | ||
* '''Alias :''' You can create an alias if you would like save | * '''Alias :''' You can create an alias if you would like to '''save time''' or if it's '''easier''' for you '''to remember''' some commands. For instance, here we have created an '''alias''' for the '''date''' command : | ||
<pre class="linux"> | <pre class="linux"> | ||
marijan$ alias dt=date | marijan$ alias dt=date |
Version du 21 mars 2024 à 17:10
Types
There exist multiple different types of shells in Linux :
- Bourne Shell (sh)
- C Shell (csh or tcsh)
- Korn Shell (ksh)
- Z Shell (zsh)
- Bourne Again Shell (bash)
All of them serve a common purpose, which is to facilitate communication between the user and the operating system.
To check the shell being used, we have to use the following command:
marijan$ echo $SHELL /bin/bash
Bash is probably the most popular shell because of these features.
It's possible to change the default shell using the following command :
marijan$ chsh Enter the new value, or press enter for the default Login Shell [/bin/bash]: /bin/sh
Features
Bash has multiple interesting features that make him the most used type of shell.
- Auto-Completion : When you are typing a command, you don't really need to type in the entire command. Indeed, you can type the beginning of the command or the name of your file or folder, and then press tab to auto-complete. Here is a example with the command ls :
marijan$ ls Docu [PRESS TAB] Documents
- Alias : You can create an alias if you would like to save time or if it's easier for you to remember some commands. For instance, here we have created an alias for the date command :
marijan$ alias dt=date marijan$ dt Thu 21 Mar 2024 04:09:44 PM CET