Showing posts with label variables. Show all posts
Showing posts with label variables. Show all posts

Friday, December 9, 2016

Locale Settings I

Locale Settings I


Configuring Locale Settings 

When you install a Linux system, you typically configure the system’s
locale during the installation process. The system’s locale determines the following:


• The language and encoding of text displayed on the screen
• Your character classes
• The default sort order
• The default number format
• The default currency format
• How the date and time are displayed



Your locale settings are determined by the values assigned to the following environment variables:

• LC_CTYPE 
  Configures the default character type and encoding

• LC_MESSAGES 
  Configures natural language messages

• LC_COLLATE 
  Configures your sorting rules

• LC_NUMERIC 
  Configures your number format

• LC_MONETARY 
  Configures your currency format

• LC_TIME 
  Configures the date and time display

• LC_PAPER 
  Configures your default paper size

• LC_NAME 
Configures the default personal name format

• LC_ADDRESS 
  Configures the default address format

• LC_TELEPHONE 
  Configures the default telephone number format

• LC_MEASUREMENT 
  Configures the default measurement unit

• LC_ALL 
  Overrides all other LC_ environment variables

• LANG 
  Specifies the default locale value for all LC_ variables

• LANGUAGE 
  Overrides LC_MESSAGES





LX0-104 Exam Objectives (M)

Wednesday, December 7, 2016

Making Variables Persistent

Making Variables  Persistent


I probably want my new PATH variable value assignment to be automatically made each time the system restarts. I don’t want to have to manually set the value of PATH and export it each time the system reboots.To do this, I can use the command to set the value of PATH to include /var/opt/mydb as well as the command to export the PATH variable to one of the following bash configuration files:

~/.bashrc

/etc/profile

~/.bash_profile

~/.bash_login

~/.profile


Adding the commands to a global bash configuration file such as /etc/profile will cause the change to be applied to all users. If you want to apply the change to only a single user, you should use the appropriate bash configuration file found in that user’s home directory.


You need to determine which files your particular distribution uses. For example, you could modify the following commands in the ~/.bash_profile file in the ksanders user’s home directory:


PATH=$PATH:$HOME/bin:/var/opt/mydb

export PATH


LX0-104 Exam Objectives (E)

variable=value

variable=value 

PATH=$PATH:/var/opt/mydb

export PATH

After I do so, the new value assigned to PATH is made available to all other shells, including any subshells created by the current shell.

LX0-104 Exam Objectives (E)

PATH environment variable

PATH environment variable


Linux does not check the current directory. This can be very confusing to new Linux administrators and users. They expect to be able to switch to the directory where an executable resides and run it from the command line.Under Linux, this doesn’t work. Instead, Linux only searches for the file being run within the directories in the current user’s PATH variable.


A typical Linux PATH environment variable is shown in this example:

rtracy@openSUSE:~> echo $PATH

/usr/lib/mpi/gcc/openmpi/bin:/home/rtracy/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games



LX0-104 Exam Objectives (D)

Setting the Value of a Variable

Setting the Value of a Variable

variable=value

PATH=$PATH:/var/opt/mydb

Saturday, December 3, 2016

Making Variables Persistent

Making Variables  Persistent


I probably want my new PATH variable value assignment to be automatically made each time the system restarts. I don’t want to have to manually set the value of PATH and export it each time the system reboots.To do this, I can use the command to set the value of PATH to include /var/opt/mydb as well as the command to export the PATH variable to one of the following bash configuration files:

~/.bashrc

/etc/profile

~/.bash_profile

~/.bash_login

~/.profile


Adding the commands to a global bash configuration file such as /etc/profile will cause the change to be applied to all users. If you want to apply the change to only a single user, you should use the appropriate bash configuration file found in that user’s home directory.


You need to determine which files your particular distribution uses. For example, you could modify the following commands in the ~/.bash_profile file in the ksanders user’s home directory:


PATH=$PATH:$HOME/bin:/var/opt/mydb

export PATH


LX0-104 Exam Objectives (E)

variable=value

variable=value

PATH=$PATH:/var/opt/mydb

export PATH

After I do so, the new value assigned to PATH is made available to all other shells, including any subshells created by the current shell.

LX0-104 Exam Objectives (E)

PATH environment variable

PATH environment variable




Linux does not check the current directory. This can be very confusing to new Linux administrators and users. They expect to be able to switch to the directory where an executable resides and run it from the command line.Under Linux, this doesn’t work. Instead, Linux only searches for the file being run within the directories in the current user’s PATH variable.




A typical Linux PATH environment variable is shown in this example:



rtracy@openSUSE:~> echo $PATH



/usr/lib/mpi/gcc/openmpi/bin:/home/rtracy/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games




LX0-104 Exam Objectives (D)

Setting the Value of a Variable

Setting the Value of a Variable

variable=value

PATH=$PATH:/var/opt/mydb