Linux Basics Flashcards

(41 cards)

1
Q

cp

A

cp: Copy file

Copies file and keeps both copies

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

mkdir

A

mkdir: Make directory

Creates a new directory

Directories in Linux are the same as folders in Windows

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

vim

A

Used to edit any text based file in terminal

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

rm

A

rm: Remove

Deletes a file

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

mv

A

mv: Move file

Moves a file into another directory or subdirectory

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

rm -r

A

rm -r: Remove recursively

Delete an entire directory and all of its contents

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

touch

A

Creates a blank file; can be used to verify write permissions in a directory or to work around error messages showing a file is missing

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

df

A

df: Disk file system

Displays a full summary of the available and used disk space usage of a file system

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

-h

A

-h: Human readable

Since this starts with a - this is called a flag or modifier, it cannot be run on it’s own

Shows data sizes in KB/MB/GB, etc. instead of in Bytes

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

head

A

Shows the first 10 lines of a file

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

tail

A

Shows the last 10 lines of a file

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

tar

A

Compresses file; like Zip for Windows

Linux also can use zip/unzip for files

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

wget

A

wget: Website file get

Download a file from the web

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

top

A

Task Manager for terminal; same as Task Manager in Windows

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

k (Used within top)

A

Kill process by PID

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

PID

A

Process ID used in top

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

history

A

Shows the complete history of all commands ran on a machine

Each command is associated with a number; you can rerun any command by entering ! and the associated # (!23)

19
Q

echo

A

Add text to the end of a file

Adds any data to the end of the desired file before the&raquo_space;

echo Schedule an interview&raquo_space; Prospective_ASRE_Candidates.txt

Prospective ASRE Candidates
Jane Doe
John Smith
Melodi Mullins Schedule an interview

20
Q

echo

echo Cohesity > Employer.txt

A

Overwrites the data in a file to be replaced with whatever is typed before the >

In the example on the front, we can assume your Employer.txt file shows World’s Best Mama in the body and it will then be changed to Cohesity

21
Q

sudo

A

sudo: Superuser do

Make the command run with admin credentials

22
Q

cd

A

cd: Change directory

There are times that you will need to access different commands in different locations, this allows you to switch between locations and work as needed

23
Q

ssh

A

Provides a secure encrypted connection between two hosts over an insecure network

You will use this command to connect to a node within a customer’s cluster

ssh 10.178.59.26

24
Q

file

A

Displays file types

25
cat
Output (display) the contents of a text file
26
vi
Unix based text editor, similar to vim
27
netstat
netstat: Network status Displays TCP connections, routing tables, and statistics
28
chmod
chmod: Change/modify Change access permissions of file system objects
29
ls -a
ls: List - a: Show all List all including hidden files
30
pwd
pwd: Print working directory Show (print) current directory name
31
flag
Flags are used to modify a command cat hugefile.log | tail (tail is the flag) Displays the last 10 lines of hugefile.log cat hugefile.log | tail -n 5 (tail, -n, and 5 are each individual flags) The tail command is modified to only display the last 5 lines of hugefile.log instead of the default 10
32
grep
Search a file for a particular pattern of characters, and displays all lines that contain that pattern
33
terminal
Any UI (User Interface) that allows you to enter commands Common terminals are Ubuntu, WSL (Windows Subsystem for Linux), Terminal (Mac), RHEL (Redhat Enterprise Linux), MobaX
34
pipe
pipe: | (this looks like a l, but it is the capitalize character on the \ key This is used to add additional commands to a command cat error_logs.txt | grep power cat displays error_logs.txt; since this will be a huge file and we know that we want to search for anything related to power so we add a pipe and tell it so search for the word power using grep
35
tfc
When tfc is used it allows you to connect directly to a customer's cluster via terminal as well as opens the GUI (web based interface that customer's use to manage their Cohesity software)
36
tfs
When tfs is used it allows you to connect directly to a customer's cluster via terminal. It will only connect via terminal and opens nothing else.
37
tfb
When tfb is used it allows you to connect directly to a customer's cluster via the GUI (web based interface that customer's use to manage their Cohesity software), it will not connect via terminal
38
bang
bang: !
39
hostips
Lists all IP addresses within a cluster; the last one shown is the node you are connected to
40
Node
An individual component within a cluster, each node has it's own IP address. There can be almost unlimited nodes within a cluster (the most I've run across is 80 within a cluster).
41
Cluster
A computer cluster is a set of computers that work together so that they can be viewed as a single system. Unlike grid computers, computer clusters have each node set to perform the same task, controlled and scheduled by software.