The Linux Command Line Chapter 11

Slides:



Advertisements
Similar presentations
Linux+ Guide to Linux Certification, Second Edition
Advertisements

CS 497C – Introduction to UNIX Lecture 36: - Customizing the Environment Chin-Chih Chang
Guide To UNIX Using Linux Third Edition
Guide to Linux Installation and Administration, 2e1 Chapter 6 Using the Shell and Text Files.
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Welcome to CSE  Name: Di Cao   Classroom: DL357  Class Time: T 8:30am - 9:18am  Office.
Introduction to Shell Script Programming
Week 7 Working with the BASH Shell. Objectives  Redirect the input and output of a command  Identify and manipulate common shell environment variables.
– Introduction to the Shell 10/1/2015 Introduction to the Shell – Session Introduction to the Shell – Session 2 · Permissions · Users.
Agenda Overview of Seneca Computer System –File Servers / Student Computer Accounts –Telnet application –How to Logon to Learn / Phobos accounts How to.
Adding New Users User as an entity - username(UID), GID. UID - typically a number for system to identify the user. GID – a number that recognizes a set.
UNIX/LINUX Shells Shell is an UNIX/LINUX command interpreter. Shell command can be internal or external. The code to execute an internal command is part.
Linux+ Guide to Linux Certification, Third Edition
Basic Shell Scripting - Part 1 Objective - Learn to: Read Start-up Files Edit Start-up Files Modify Your User Environment Communicate with Users Write.
Linux+ Guide to Linux Certification Chapter Eight Working with the BASH Shell.
Chapter 0 A “Quick-Start” into the UNIX Operating System.
EMT 2390L Lecture 5 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
Customizing Linux Environment Tutorial 4 ENGR 3950U / CSCI 3020U Operating Systems Instructor: Dr. Kamran Sartipi.
Agenda Overview of Seneca Computer System File Servers / Student Computer Accounts Telnet application How to Logon to Learn / Phobos accounts How to Change.
Unix Shell Environments February 23rd, 2004 Class Meeting 6.
UNIX shell environments CS 2204 Class meeting 6 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
User Environments Objectives –to provide appropriate environments for different types of users Contents –different login programs –user profiles –restricted.
UNIX shell environments CS 2204 Class meeting 4 Created by Doug Bowman, 2001 Modified by Mir Farooq Ali, 2002.
CSCI 330 UNIX and Network Programming Unit III Shell, Part 1.
Agenda Overview of Seneca Computer System File Servers / Student Computer Accounts Telnet application How to Logon to Learn / Phobos accounts How to Change.
Linux+ Guide to Linux Certification, Second Edition
Configuration your environment Many user-configurable Unix programs (such as your shell) read configuration files when they start up. These configuration.
Linux Administration Working with the BASH Shell.
Agenda Customizing a Unix/Linux account Environment Introduction to Start-up Files (.bash_profile,.bashrc,.profile,.kshrc) Safe Methods for Changing Start-up.
A “Quick-Start” into the UNIX Operating System
SUSE Linux Enterprise Desktop Administration
Introduction to Shells
Part 3 – Remote Connection, File Transfer, Remote Environments
Shell Environments.
The Linux Command Line Chapter 14
Writing Shell Scripts ─ part 3
Writing Shell Scripts ─ part 3
UNIX and Shell Programming (06CS36)
Chapters 1–4 Mark G. Sobell
Chapter 8–Part V Mark G. Sobell
The Linux Command Line Chapter 16
The Linux Command Line Chapter 12
CHAPTER 8 (skip , ) CHAPTER 10
The Linux Command Line Chapter 2
The Linux Command Line Chapter 29
The Linux Command Line Chapter 1
The Linux Command Line Chapter 6
The Linux Command Line Chapter 10
The Linux Command Line Chapter 7
The Linux Command Line Chapter 18
The Linux Command Line Chapter 27
CSCI The UNIX System Shell Startup and Variables
The Linux Command Line Chapter 24
The Linux Command Line Chapter 11
The Linux Command Line Chapter 3
The Linux Command Line Chapter 26
The Linux Command Line Chapter 28
The Linux Command Line Chapter 9
The Linux Command Line Chapter 17
The Linux Command Line Chapter 4
The Linux Command Line Chapter 25
The Linux Command Line Chapter 14
Unix Shell Environments
The Linux Command Line Chapter 5
The Linux Command Line Chapter 3
The Linux Command Line Chapter 4
The Linux Command Line Chapter 12
The Linux Command Line Chapter 24
The Linux Command Line Chapter 26
The Linux Command Line Chapter 27
Presentation transcript:

The Linux Command Line Chapter 11 The Environment Prepared by Dr. Reyes, New York City College of Technology

The Environment Environment: Information maintained by the shell during a particular session. The system maintains this information using the following Shell variables: variables used by the bash shell Environment variables: all the other variables available in the system Aliases: a command or a series of commands associated with a name (alias). Shell functions: will be covered later

Display the Environment Variables printenv – command used to display the environment variables Result:

Display the value of a single variable echo – command to display a string in the terminal $ - use this sign in front of a variable to read its value You can also use the command printenv followed by the name of the variable

Alias Command alias – used by itself, this command will display all the aliases in the environment

Some Interesting Variables

How Is The Environment Established? When you log on to the system a series of files are read. There are two types of sessions: Login shell session – where you enter your username and password Non-login session – when you start the terminal right away (guess session)

Files Read For login shell session: For non-login shell session:

How to Modify the Environment In general you want to edit the most specific file such as .bashrc or .profile and then move up if necessary. Strongly recommended to make a backup copy and add the changes to the bottom of the file To apply the changes use the source command: