Linux Shell
What is Linux Shell?
Linux shell is a command-line interface used to interact with the operating system. It allows users to execute commands and scripts to perform various tasks. When the commands entered in the shell, it will be executed immediately and the output will be displayed on the terminal.
When the user logins to a Linux system, the shell is started automatically. The default shell for most Linux distributions is Bash (Bourne Again Shell), but there are other shells like Zsh, Fish, etc.
Login to Linux Shell
To login to a Linux shell, you can use a terminal emulator or SSH (Secure Shell) to connect to a remote Linux system.
ssh username@hostnameWhen you’re login to the shell, you’ll be prompted to enter your password. After successful authentication, you’ll be placed in the home directory of the user, typically located at /home/username. For example, if your username is john, your home directory will be /home/john.
This home directory is your own personal workspace used to store files, configurations, and settings specific to your user account.
What is ~?
You can use pwd command to print the current working directory.
In Linux shell, the tilde symbol ~ represents the home directory of the currently logged-in user. For example, if your username is john, then ~ would refer to /home/john.