Command Line Interface Flashcards
(30 cards)
1
Q
my computer’s network name
A
hostname
2
Q
make directory
A
mkdir
3
Q
change directory
A
cd
4
Q
list directory
A
ls
5
Q
remove directory
A
rmdir
6
Q
push directory
A
pushd
7
Q
pop directory
A
popd
8
Q
copy a file or directory
A
cp
9
Q
move a file or directory
A
mv
10
Q
page through a file
A
less
11
Q
print the whole file
A
cat
12
Q
execute arguments
A
xargs
13
Q
find files
A
find
14
Q
find things inside files
A
grep
15
Q
read a manual page
A
man
16
Q
find which manual page is appropriate
A
apropos
17
Q
look at your environment
A
env
18
Q
print some arguments
A
echo
19
Q
export/set a new environment variable
A
export
20
Q
exit the shell
A
exit
21
Q
DANGER! become super user root DANGER!
A
sudo
22
Q
To write in a file
A
nano
23
Q
to save in nano
A
ctrl + O
24
Q
to exit nano
A
ctrl + X
25
to exit less
Q
26
What are the cursor navigation prompts?
CTRL + a : Move to end
CTRL + e : Move to end
Use Up and Down arrow keys to toggle through previous commands
CTRL + u : Clears current line
CTRL + l : Clears the terminal window (does not clear history)
27
How to display hidden files?
ls -a
28
How to move files into directories?
mv + file_to_move + destination_path : Move a file or folder to a new location
mkdir + directory1 + directory2 + directory3... : Make multiple directories at once.
29
How to merge branches after making a commit?
git merge (branch not worked on yet)
30
What is rebasing?
It takes a set of commits, copies them and sets them down somewhere else.
git rebase