Sindhu S
sindhus@live.in 2013
Ekaterina Gerasimova
kittykat3756@gmail.com 2013-2014
Michael Hill
mdhillca@gmail.com 2013

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License and a GNU General Public License version 3. It may be redistributed and/or modified under either license.

GPL 3 statement:

This work is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Start a login shell in Terminal.
Fran Dieguez
frandieguez@gnome.org 2013.
Leandro Regueiro
leandro.regueiro@gmail.com 2011.

# Login shells

Shells in UNIX based systems can be started up in login and non-login modes:

# Login shell

A login shell is a shell given to a user upon login into their user account. This is initiated by using the -l or --login option, or placing a dash as the initial character of the command name, for example invoking bash as -bash.

# Sub shell

Sub shell, also called a non-login shell is a shell started after the login process without the -l or --login option and without an extra dash before the command name.

The general cases for having a login shell include:

Accessing your computer remotely using ssh.

Simulating an initial login shell with bash -l or sh -l.

Simulating an initial root login shell with sudo -i.

# Start a login shell

You can allow Terminal to start a login shell. Your default shell will be started with a dash character prepended to its name.

Press the menu button in the top-right corner of the window and select Preferences.

In the sidebar, select your current profile in the Profiles section.

Select Command.

Under the Command label, select Run command as a login shell.