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
cat filename1 filename2>filename3
 joins two files (1 and 2) and stores the output of them in a new file (3)
26
cat filename | tr a-z A-Z >output.txt
to convert a file to upper or lower case use
27
cp
It is used to copy files from the current directory to a different directory.
28
mv
It is used to move files, although it can also be used to rename files.
29
mkdir
it is used to create a new directory
30
rmdir
it is used to remove a directory
31
rm
it is used to remove directories and the contents with them , "to only remove the directory use rmdir … or rm -r …"
32
touch
it is used to create a blank new file
33
locate
t is used to to locate a file, just like the search command in Windows. "What’s more, using the -i argument along with this command will make it case-insensitive"
34
find
Similar to the locate command, using find also searches for files and directories. The difference is, you use the find command to locate files within a given directory.
35
grep
It lets you search through all the text in a given file. "To illustrate, grep blue notepad.txt will search for the word blue in the notepad file. Lines that contain the searched word will be displayed fully."
36
df
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, type df -m."
37
du
: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 -h argument to the command line.