Command Line Interface Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

my computer’s network name

A

hostname

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

make directory

A

mkdir

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

change directory

A

cd

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

list directory

A

ls

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

remove directory

A

rmdir

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

push directory

A

pushd

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

pop directory

A

popd

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

copy a file or directory

A

cp

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

move a file or directory

A

mv

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

page through a file

A

less

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

print the whole file

A

cat

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

execute arguments

A

xargs

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

find files

A

find

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

find things inside files

A

grep

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

read a manual page

A

man

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
Q

to exit less

A

Q

26
Q

What are the cursor navigation prompts?

A

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
Q

How to display hidden files?

A

ls -a

28
Q

How to move files into directories?

A

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
Q

How to merge branches after making a commit?

A

git merge (branch not worked on yet)

30
Q

What is rebasing?

A

It takes a set of commits, copies them and sets them down somewhere else.

git rebase