Linux Basics Flashcards
(41 cards)
cp
cp: Copy file
Copies file and keeps both copies
mkdir
mkdir: Make directory
Creates a new directory
Directories in Linux are the same as folders in Windows
vim
Used to edit any text based file in terminal
rm
rm: Remove
Deletes a file
mv
mv: Move file
Moves a file into another directory or subdirectory
rm -r
rm -r: Remove recursively
Delete an entire directory and all of its contents
touch
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
df
df: Disk file system
Displays a full summary of the available and used disk space usage of a file system
-h
-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
head
Shows the first 10 lines of a file
tail
Shows the last 10 lines of a file
tar
Compresses file; like Zip for Windows
Linux also can use zip/unzip for files
wget
wget: Website file get
Download a file from the web
top
Task Manager for terminal; same as Task Manager in Windows
k (Used within top)
Kill process by PID
PID
Process ID used in top
q
Quit
history
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)
echo
Add text to the end of a file
Adds any data to the end of the desired file before the»_space;
echo Schedule an interview»_space; Prospective_ASRE_Candidates.txt
Prospective ASRE Candidates
Jane Doe
John Smith
Melodi Mullins Schedule an interview
echo
echo Cohesity > Employer.txt
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
sudo
sudo: Superuser do
Make the command run with admin credentials
cd
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
ssh
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
file
Displays file types