Linus Flashcards

1
Q

Working with Linus
-Greatness of __
-Navigation__
-Directory and File ___
-File __
-Text editor ___

A

Greatness of UNIX
Navigation commands
Directory and File Operation
File Editing
Text Editor commands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Recognition vs Recall
-Humans naturally skilled at __
-Recall takes time and ___
-GUI = __
-Command-line = ___
-Be patient with yourself
-___ comes with continued used

A

Humans natually skilled at recognition
recall takes time and experience
GUI = Regogniton
Command-line = Recall
Be patient with yourse
Derexity comes with continued use

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

History of UNIX
-Thompson&Ritchie __
-__-user
-icredibly __

UNIX Fragmentation
-HP-UX (____)
-AIX (IBM)
-Solaris (____)

A

Thompson and ritichie 1969
multiuser
incredbily stable
HP UZ Hewelett Packard
AIX IBM
Solaris Sun Microsystems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Case Sensitiity
-___ is a precise system where case matters
-In command __ is not the same as __
-Filenaming provides two different files for __ and ___ in the same directory
-Charcters like spaces in filenames___ are literal

A

UNIX is a precise system where case matters
In commands -r is not the same as -R
Filenaming provides tow different files for myfile.txt and Myfile.txt in the same directory
Character like spaces in filenames Judd”“Bradbury,txt are literal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Linux
- ___ created his own version of UNIX
-Linux open source based on the __ standard
There are several modern examples

A

Linus Tovalds created his own version of UNIX
Linus open source based on the POSIX standard
there are several modern examples
Mac OSX -Terminal
Windows - BASH
VirtualBox
CentOS VM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Distribution of Linux
___ used on apple computers
___ enerprise version called RHEL
___ popular desktop operating system
___ most popular for web servers and IOT
___ second most popular for web servers and IOT

A

OSX
Redhat (IBM)
Ubuntu
Debian
CentOS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Kernal and Shell
-the kernal is the main system interface to the __
-The __ is how the user interacts with the kernal
-Original shell _ was written by ____
-Linus scripts are written for your _ _

A

The kernal is the main system interface to the hardware
the shell is how the user interacts with the kernal
orginal shell sh was writte by stevee bounre
Linux scripts are written for you specifc shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Shell Prompt
[username@linuxsytem ~]$
Appearance communicates shell is ready for input
user below is hadoop
Linux system is ip-10-16-10-165

A

[hadoop@ip-10-16-10-16]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

ssh
ssh is similar to __
the __ adds a security layer to the ___
ssh is ____
provides remote login to Linux systems using the __

A

ssh is similar to https
the s adds a security layer to the interaction
sss is security secured shell
provides remone login to linux system using the internet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Commands Available

A

The first character of the command and then <tab>
Copy is <contorl> <c>
Paste is <control> <v>
when you see a <placeholder>, replace everyitng including these <></placeholder></v></control></c></contorl></tab>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

History
-___ provides a list of your previous commands
-___ provides your last command moving up the list
-___ moves down the list
-____ postions cursor for editing
- stored in ___

A

History provides a list of your previous commands
Up-arrow provides your last command moving up the list
down-arrow moves down the list
-left/right arrow positions cursor for ediitng
stored in ~/ .history

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Clear
___ removes one screen of previous text
Every now and again you want a clear screen to _____

A

clear removes one screen of previous text
every now and again you want a clear screen to make life simple

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

print working directory
___ is the print working directory
think of it as your ____
command is useful in scripts as a ____
working directory is ____

A

pwd is the print working directory
think of it as your current working directory
command is useful in scripts a a baseline directory
working directory is /home/hadoop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Linux user Manual
___ is shor for user manual that provides an overview of any command
___ provides an overview of the list command

A

man is short for user manual that provides an overview of any command
man ls provides an overview of the list command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Review a Manual page
Overview for the _ command
_ provides navigation commands in the manual
__ quits the manual

A

overview for the ls command
h provides navigation commands in the manaul
q quits the manaual

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Listing directories
_ or _ provides a list of contents in the current directory
options can be added after the command
___ (long format with access privelges)
___ (all files including hidden)
_ (human readable)
_ provides highlight for directories)

A

ls or list provides a list of content in the current directory
-l long format with access privleges
-a all files including hidden
-h human readable
-F provides a highlight for directories

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Creating directories
___ makes a new directory
new directory is call juddbradbury
__ communicates parent directory
_ creates the parents child realtionship for __________
_ is a child residing in the parent __ directory

A

mkdir makes a new directory new directory is call juddbradbury
-p communicates parent directory
/ creates the parent child relationship for dir1/dir2/dir3
dir2 is a child residing in the parents dir1 directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

change directory
__ will change the directory
___ brings you to your home directory
___ changes the directory
___ goes back one directory

A

cd will change the directory
cd ~ brings you to your home directory
cd juddbradbury chages the directory
cd.. goes back one directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Directory commands
___ then type a couple of charcacter in and then __ comples the previous command
__ returns the previous working directory
helpful when you are working with _____

A

cd then type a coupple of characters of the directory you were working in and then <tab> completes the previous command
cd - returns to the previous working directory
helpful when you are working with very long directories</tab>

19
Q

remove directory
__ wil change the directory
__ for recursive is required to remove a directory
parent child directory strucuteres are

A

rm will change the directory
-r for recursive is required to remove a directory
paretn child directory structures are removied

20
Q

Copy a directory
__ copies a directory
_ for recursive _ from the current directory
___ copies the bradbury directory with files

A

cp -r copes a directory
-r for resurve ./ from the current directory
cp-r ./Bradbury ./Kerouac copies the Bradbury directory with files

21
Q

Copy a File
___ is the syntax
frostroad.txt file is copied into the bradbury directory as newroad.txt
_ upades new files, _ updadtes user permissions only

A

cp <source></source><destination> is the syntax
frostroad.txt file is copied into the Bradbury directory as newroad.txt
-u updates new files only, -a upades user permissions only</destination>

22
Q

copy files to new directory
purplecow.txt is in the Bradbury directory
Notice the the name for the same file

A

cp-r ./Bradbury/purplecow.txt ./Kerouac/ redcow.txt

23
Q

removing files
__ removes files and directories
_ removied the purplecow.txt file
__ removed the ./Kerouac directory

A

rm removes files and directories
rm removed the purplecow.txt
rem -r removed the ./Kerouac directory

24
Q

Move files
___ moves files
___ movies the two files into the bradbury directory

A

mv <source></source><target> moves files
mv frostraod.txt purplecow.txt Bradbury moves the two files into the Bradbury directory</target>

25
Q

Move to a new directory
mv creates a new directory from an old one
____ creates a new directory called Poems containg the files from Bradbury
Bradbury is deleted

A

mv creates a new directory from an old one
mv ./Bradbury ./Poems creates a new directory called Poems containting the files from Bradbury
Bradbury is deleted

26
Q

Overwrite a file with move
We need to update a current Production file with the contents in newfile.txt
____ replaces the contents in currentfile.txt

A

mv newfile.txt currentfile.txt replaces the content in currentfile.txt

27
Q

Wildchard characters
__ any wild card characters, one or many
__ any single wildcard character
___ enages the character in the bracket
___ engages all characters expect these in the bracket
__ filenames begging with alpha or 0-9 numbers
___ filenames begging with alpha
___ filenames beggining with numbers
___ files beggining with lowercase alpha
___ files begging with uppercase alpha

A
  • any wildcard characters, one or many
    ? any single wildcard character
    [characters] enages the character the brackets
    [!characters] enagages all character execpt these in the brackets
    [:alnum:] filenames beggining with alpha or 0-9 numbers
    [:alpha:] filenames beggining with alpha
    [:digit:] filenames beginning with numbers
    [:lower:] files beginning with lowercase alpha
    [:upper:] files beginning with upper case alpha
28
Q

wildcar examples
__ for all files
__ anything that begins with g
___ file begins with by b followed by any other charcters of type.txt
___ file beggining with an uppercase letter

A
  • for all files
    g* anything that begins with g
    b.txt file begins with b followed by characters of type.txt
    [[:upper:]]
    file beggining with an uppercase letter
29
Q

wildcard execution
Files named beginning with g are in the Wildcard directory
begin with the letter g to the Production directory

A

mv ./Wildcard/g*.txt ./Production moves all files that
begin with the letter g to the Production directory

30
Q

Alias
fav commands are pwd and ls
put them togheter with alias ___
___ now runs both commands

A

put them together with alias startup=’pwd;ls’
startup now runs both commands

31
Q

head

___ provides the first set of data rows at the top of the file
__ allows specification of the number of lines

A

head <filename> provides the first set of data rows at the top of the of the file
-n allows specification of the number of lines</filename>

32
Q

Word Count
__ counts the number of rows words and bytes in that order
23 144 733 frostroad.txt

A

wc
wc frostroad.txt

33
Q
A
33
Q

view a file using less
___ provides a review of the file contents
review of the frostroad.txt file

A

less frostroad.txt

34
Q

Grep
_ searches for a word in the specified file
__ containtng the specified word are returned
AND is found in six rows in the forastroad.txt file

__ ignores the case, __ is the not found condition

A

grep
Records
-i
-v

grep -i “frost” frostroad.txt
grep -v “pattern” filename

35
Q

concatendate
__ concatenates the contentss of files togehter
___ fills the file with what is entered on the screen
contents of multiple files another file3.txt
__ will exit the command

A

cat conccatenates the contents of files together
cat>file1.txt fills the file with what is entered on the screen
contents of multipe files can fill another file3.txt
Control D will exit the command

cat file1.txt file2.txt > file3.txt

36
Q

touch
_ updates the time/date stamp and creates empty files
__ created an empty file
__ updated the time from 1:16 to 1:55

A

touch updates the time/date stamp and creates empty files
touch emptyfile:txt created an empty file
touch foodsales.csv updated the time from 1:16 to 1:55

37
Q

Super user do
__
allows users to execute commands as a ___
users enter their own ___ versus a common password

_
allows for the _ of a file to be changed
sudo chown tony: ~tony/file.txt

A

sudo allows users to execute command as super user(root)
users enter their own password versus a common password

chown
allows for the ownership of a file to be changes

sudo chown tony: ~tony/file.txt will change the ownership of a file moved to directory

38
Q

chmod

_ sets permissions for ,, and _ all users
___ provides read write and execute for each level
-—— user controls
—-
— group controls
——-rwx other controls (all system users)

Digits assigns the following levels of access
_ =rwx (read write execute)
_ =rw- (read write)
_ = r-x (read execute)
_ =r— (read)

A

 chmod sets permissions for user, group, and other (all users)
 drwxrwxrwx provides read write and execute for each level
 -rwx—— user controls
 —-rwx— group controls
 ——-rwx other controls (all system users)
 Digits assign the following levels of access
 7 = rwx (read write execute)
 6 = rw- (read write)
 5 = r-x (read execute)
 4 = r– (read)

39
Q

chmod file changes
__ assigns rwx to the user, group, and all
users major red flag, file is wide open, almost never use

__is a good alternative, very restricted and safe

A

 chmod 777 foodsales.txt
600

40
Q

Find
_ finds the location of files
_ find / searches the homes directory for the gold.txt file
__ suprssess file permssion errors
content of files can also be searched

A

find finds the location of files
 find / searches the homes directory for the gold.txt file
 2>/dev/null suppresses file permission errors
 Content of files can also be searched

41
Q

Echo
_ echoes text to the screen
uses in _ and file creation by bringing items to the screen

A

Echo
script and file

41
Q

Nano Text editor
_ opens the filee in a text editor
frostraod.txt will open in the text editor

A

nano <filename> opens the file in a text editor
 frostroad.txt will open in the text editor</filename>

42
Q

nano navigation
_ is the control key
_ is the alt key
_ navigate the text
edit like a _
highlight with mouse right click to _
_ will exit
promot to save on exit

A

^ is the control key
 M is the alt key
 Arrow keys navigate the text
 Edit like a word document
 Highlight text with mouse, right
click to copy/paste
 control x will exit
 Prompt to save on exit

43
Q

summary

A

Linux working in a secure shell
 Navigation commands
 Understand make/remove/move directories and files
 Reviewing file contents
 Assigning file privileges
 Opening files and editing them in a text editor