LINUX Flashcards

1
Q

pwd

A

pwd : It prints the current directory

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

cd

A

cd :it changes directory

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

cd /…

A

cd /.. : change directory to an absolute path under the computer directory which is the main directory

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

cd ./…

A

change directory in the current directory

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

ls or l

A

It lists the contents of the directory in alphabetical order

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

ls -l

A

lists the contents in the long way aka more details (the user , the groupe, the date , the time, permissions …), ls -r It lists the contents in revrsed alphabetical order

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

ls -r

A

It lists the contents in revrsed alphabetical order

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

ls -p

A

lists contents with file types

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

ls -s

A

it lists contents sorted by directories/files size

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

sudo (Super User DO):

A

It allows you to make changes to files and perform administrative tasks for the current command

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

sudo !!

A

It means run the previous command with sudo,

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

sudo su

A

it takes you to the root user so you can avoid typing sudo for every command if you want to use it for multiple tasks

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

su (Switch User )

A

It allows you to change the user su …

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

apt-get

A

It installs a package or a program that already exists or preinstalled in the unbuntu repositories

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

sudo apt-get install vscode :

A

it installs the vscode application we use sudo because installation need administrative permission

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

apt-cache …

A

:It allows us to search for the program

17
Q

apt-cache search vscode*

A

it searchs anything with the word vscode in it

18
Q

apt-cache policy vsscode

A

it search for the installed program and it gives you its version and repositories

19
Q

dpkg

A

it installs , builds and removes debian packages

20
Q

dpkg -i chrome-stable.deb

A

: is used to install the chrome package

21
Q

dpkg -l

A

: is used to list the installed packages

22
Q

dpkg –contents chrome-stable.deb

A

it lists contents of a package

23
Q

cat

A

It is used to list the contents of a file

24
Q

cat > filename

A

creates a new file

25
Q

cat filename1 filename2>filename3

A

joins two files (1 and 2) and stores the output of them in a new file (3)

26
Q

cat filename | tr a-z A-Z >output.txt

A

to convert a file to upper or lower case use

27
Q

cp

A

It is used to copy files from the current directory to a different directory.

28
Q

mv

A

It is used to move files, although it can also be used to rename files.

29
Q

mkdir

A

it is used to create a new directory

30
Q

rmdir

A

it is used to remove a directory

31
Q

rm

A

it is used to remove directories and the contents with them , “to only remove the directory use rmdir … or rm -r …”

32
Q

touch

A

it is used to create a blank new file

33
Q

locate

A

t is used to tolocatea file, just like the search command in Windows. “What’s more, using the-iargument along with this command will make it case-insensitive”

34
Q

find

A

Similar to thelocatecommand, usingfindalso searches for files and directories. The difference is, you use thefindcommand to locate files within a given directory.

35
Q

grep

A

It lets you search through all the text in a given file.
“To illustrate,grep blue notepad.txtwill search for the word blue in the notepad file. Lines that contain the searched word will be displayed fully.”

36
Q

df

A

It is used to get a report on the system’s disk space usage, shown in percentage and KBs. “If you want to see the report in megabytes, typedf -m.”

37
Q

du

A

:Disk Usage) It is used to check how much space a file or a directory . However, the disk usage summary will show disk block numbers instead of the usual size format. If you want to see it in bytes, kilobytes, and megabytes, add the-hargument to the command line.