Linux Notes

Stumbled across these useful commands today:

Display Environment variables

  • set   # prints environment variables, includes stuff like: BASH_ARGC=()
  • printenv #prints environment variables, seems to be a much shorter list
  • env # prints environment variables, seems to be a much shorter list
  • use /etc/environment to set global environment variables

Symbolic links

  • cd -p #follow symbolic links
  • readlink -f  #expands symbolics links

Misc

  • use su – to create a login shell
  • A login shell “Provides an environment similar to what the user would expect had the user logged in directly.”
Advertisements
Posted in Linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: