UNIX Shells Lecture Review

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/36

flashcard set

Earn XP

Description and Tags

Flashcards covering key terms and definitions related to UNIX shells, shell choices, history, environment variables, prompts, and aliases, based on the provided lecture notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

37 Terms

1
New cards

Shell

A Unix program that acts as an interface between the user and the system, running other Unix commands; essentially, the command line itself.

2
New cards

sh

The Bourne Shell, one of the different types of Unix shells.

3
New cards

csh

The C shell, one of the different types of Unix shells.

4
New cards

tsch

The Turbo C Shell, one of the different types of Unix shells.

5
New cards

ksh

The Korn shell, one of the different types of Unix shells.

6
New cards

bash

The Bourne Again Shell, one of the different types of Unix shells, and the most commonly used.

7
New cards

Shell Differences

While all shells run programs the same way, they differ in features, such as 'bells and whistles' and shell programming capabilities.

8
New cards

printenv SHELL or echo $SHELL

Commands used to check which shell you are currently using.

9
New cards

chsh

A program used to permanently change your default shell every time you login.

10
New cards

.login or .profile

Startup files that get read only once when you login to a Unix system.

11
New cards

.bashrc or .tcshrc

Startup files that get run every time a new shell is created.

12
New cards

HOSTNAME

An environment variable that indicates the name of the host machine.

13
New cards

TERM

An environment variable specifying the terminal type.

14
New cards

SHELL (environment variable)

An environment variable that specifies the path to the user's login shell.

15
New cards

HISTSIZE

An environment variable that defines the number of recent commands Bash will keep track of in its history.

16
New cards

USER

An environment variable indicating the current logged-in user's username.

17
New cards

PWD

An environment variable indicating the current working directory.

18
New cards

HOME

An environment variable indicating the path to the user's home directory.

19
New cards

VISUAL or EDITOR

Environment variables that typically specify the default text editor to be used.

20
New cards

PS1

An environment variable that determines the appearance and content of your command prompt.

21
New cards

\H or \h

Special prompt symbols that display the hostname.

22
New cards

\T, \t, or \@

Special prompt symbols that display the current time.

23
New cards

\u

Special prompt symbol that displays the current username.

24
New cards

\w or \W

Special prompt symbols that display the current working directory.

25
New cards

!

Special prompt symbol that displays the command line number.

26
New cards

Backtick (`)

Used in the PS1 environment variable to execute a program and embed its output directly into the prompt.

27
New cards

Bash History

A feature where Bash keeps track of the most recent commands entered, configurable by HISTSIZE.

28
New cards

.bash_history

A hidden file in the user's HOME directory where Bash history is stored, updated after logout.

29
New cards

history [NUMBER]

A command that prints out all of your most recent commands, assigning a number to each.

30
New cards

!!

A Bash shortcut to repeat and execute the last command.

31
New cards

!NUMBER

A Bash shortcut to execute a command from history based on its assigned number, e.g., !123.

32
New cards

!CHARS

A Bash shortcut to execute the most recent command that starts with the specified characters, e.g., !m.

33
New cards

!*

A history shortcut that gets everything but the first word of the previous command, useful for running a different command with the same arguments.

34
New cards

!$

A history shortcut that gets just the last word of the previous command.

35
New cards

Aliases

User-defined shortcuts that create an alternative name for a specific command or sequence of commands, useful for consistently applying flags.

36
New cards

alias NAME="COMMAND"

The command syntax used to set an alias, e.g., alias ll="ls –l".

37
New cards

unalias NAME

The command syntax used to remove a previously set alias, e.g., unalias cp.