Glam Prestige Journal

Bright entertainment trends with youth appeal.

In this question, it is mentioned that there is no standard behavior in terms of whether .profile is read or not when a user logs in from the GUI in today's Linux and Unix systems. So for Ubuntu, is .profile read when I log in from the GUI?

On a somewhat unrelated note, is there a way to log in to Ubuntu locally via the terminal only (i.e. not using GUI and not using SSH to remote it)?

1

1 Answer

Quoted from

~/.profile

In this file you can also place environment variable assignments, since it gets executed automatically by the DisplayManager during the start-up process desktop session as well as by the login shell when one logs in from the textual console. This is a ~/.profile equivalent of the above example:

export FOO=bar export PATH="$PATH:$HOME/MyPrograms" Note: The code in ~/.profile is run after ~/.pam_environment has been read. That makes ~/.profile suitable to use if you want to override a locale related variable that was set in ~/.pam_environment via e.g. Language Support.

It gets executed automatically by the DisplayManager during the start-up process desktop session as well as by the login shell when one logs in from the textual console.

This means that either GUI or CLI will read and use .profile

Is there a way to log in to Ubuntu locally via the terminal only

The answer is sure. you can either use:

  • Virtual terminals(consoles) tty[1..6]
  • Booting in text mode

Virtual terminals(consoles) tty[1..6]

To use tty[1..7] just press the shortcut Ctrl+Alt+F[1..6]

PS: tty[1..6] = tty1 ,tty2, ... tty6

To boot into true text mode

Edit in /etc/default/grub

Stops the Ubuntu splash

#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Uncomment to disable graphical terminal by removing the leading hash #

GRUB_TERMINAL=console

Then update your grub to load the new configuration:

sudo update-grub

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy