Shell

studied byStudied by 1 person
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 21

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

22 Terms

1
When is the .profile file loaded?
Once, when you login into your os
New cards
2
When is the .rc file loaded?
Every time you start a new terminal.
New cards
3
What was the default shell in UNIX 7?
The Bourne Shell (sh) created by Stephen Bourne.
New cards
4
Is there only 1 shell?
No, There are a lot of different shells.
New cards
5
Does the Bourne Shell load the .rc file?
No.
New cards
6
What was the replacement of the Bourne Shell (sh)?
The Bourne shell is mostly dead by now and was replaced with bash (Bourne Again Shell) or on newer Linux versions, with dash.
New cards
7
Name another very popular shell.
zsh (Z Shell)
New cards
8
If you want to add a path to your PATH variable that should be permanent, where to add it?
You need to do it in either the .profile or .rc file, otherwise it will get lost once you restart the terminal.
New cards
9
How do I add an alias?
To add a new Alias, go into your .rc file and add it with: alias aliasname=command
New cards
10
What does the $SHELL command tell you?
The current shell you are using.
New cards
11
How can I check if my default shell is just a symlink to another shell?
Go into the directory of the default shell and run ls -lah. This is often used to symlink sh to bash.
New cards
12
What does the $PWD environment variable stand for?
Print working directory.
New cards
13
How can you create a symlink?
Use the command ln -s FILE DESTINATION.
New cards
14
How can you see all registered shells?
Cat the content of /etc/shells.
New cards
15
How can you get a list of all environment variables?
Use the command export -p.
New cards
16
What does the $ sign in the terminal represent?
The $ sign in the terminal stands for a variable.
New cards
17
How can you use the result of one command inside another?
You can use a variable: echo that is the path for $(which brew)
New cards
18
How can you directly access a binary file from anywhere if its directory is registered in your path?
By simply typing the name of the binary file in the command line.
New cards
19
How can you change the default shell to zsh as example?
chsh -s $(which zsh)
New cards
20
How can you check the directories that are registered in your path?
echo $PATH
New cards
21
An alternative to see the location of a command: command -v brew
which brew
New cards
22
\
New cards

Explore top notes

note Note
studied byStudied by 1062 people
705 days ago
4.8(4)
note Note
studied byStudied by 4 people
58 days ago
5.0(3)
note Note
studied byStudied by 20 people
775 days ago
5.0(1)
note Note
studied byStudied by 47 people
834 days ago
5.0(1)
note Note
studied byStudied by 12 people
833 days ago
5.0(1)
note Note
studied byStudied by 45 people
818 days ago
5.0(1)
note Note
studied byStudied by 5 people
654 days ago
5.0(1)
note Note
studied byStudied by 67 people
420 days ago
5.0(1)

Explore top flashcards

flashcards Flashcard (106)
studied byStudied by 1 person
714 days ago
5.0(1)
flashcards Flashcard (31)
studied byStudied by 4 people
91 days ago
5.0(1)
flashcards Flashcard (74)
studied byStudied by 16 people
841 days ago
5.0(2)
flashcards Flashcard (167)
studied byStudied by 6 people
393 days ago
5.0(1)
flashcards Flashcard (81)
studied byStudied by 272 people
468 days ago
4.5(2)
flashcards Flashcard (37)
studied byStudied by 173 people
841 days ago
5.0(1)
flashcards Flashcard (36)
studied byStudied by 10 people
91 days ago
5.0(1)
flashcards Flashcard (62)
studied byStudied by 14 people
42 days ago
5.0(1)
robot