operating systems exam Flashcards

1
Q

Get root privilege for one command only

A

sudo <mycommand></mycommand>

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

Update the repository.

A

sudo apt update

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

Get an app from the repository

A

sudo apt install <name></name>

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

Remove an app from the repository

A

sudo apt remove <name></name>

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

Clear the screen

A

clear

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

prints the full name (the full path) of current/working directory

A

pwd

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

list the names and features of files and directories

A

ls

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

list information about files and directories within the file system

A

ls -l

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

change current working directory

A

cd

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

prints the previously used directory and changes to it.

A

cd -

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

to display the contents of a file

A

cat <filename></filename>

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

o see the virtual memory swap file called swapfile in the root directory

A

ls –l /

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

To see disk information

A

sudo fdisk -l

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

what is an iso file

A

An ISO file is an exact copy of an entire optical disk such as a CD, DVD, or Blu-ray archived into a single file.

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

display the contents of a directory in ascending order alphabetically

A

dir

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

go back to the parent directory

A

cd..

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

go back to the root directory

A

cd /

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

sudo apt install <filename></filename>

A

installs an application

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

display the free disc space of a specific file system.

A

df -l

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

show information (manual) about a command

A

man

21
Q

switch to a different user

A

su

22
Q

edit files/creates files

A

nano

23
Q

copies file

A

cp

24
Q

removes file

A

rm

25
Q

moves file

A

mv

26
Q

check if server is up and running
eg ping www.rte.ie

A

ping

27
Q

create a file directory (folder)

A

mkdir <name></name>

27
Q

edits a file

A

gedit

28
Q

describe each directory
i. home
ii. /bin
iii. /etc
iv. /usr

A

home = is a directory for a particular user of the system and consists of individual file
bin = includes basic binaries that are required for the system’s basic function.
etc = contains system configuration information
usr = the location of user programs and files

29
Q

search and matches text patterns in files contained in the regular expressions.

A

grep

30
Q

run a program typed in a text file

A

bash

31
Q

display a line of text

A

echo

32
Q

display the last line of a file

A

tail

33
Q

display the first line of a file

A

head

34
Q

change file permissions

A

chmod

35
Q

chmod info (sorry its long i was too lazy to make more docs notes)

A

The chmod command in Linux is used to change the permissions of files and directories. “chmod” stands for “change mode”. Permissions in Linux determine who can read, write, or execute a file or directory. The chmod command allows you to modify these permissions for the owner of the file, members of the group associated with the file, and other users.

Here’s the basic syntax of the chmod command:

chmod [permissions] [file]

The [permissions] part specifies which permissions you want to set, and [file] is the name of the file or directory for which you want to change permissions.

Permissions are represented by three types:

User (Owner):

r (read): Allows the owner to read the file or directory.
w (write): Allows the owner to write to the file or directory.
x (execute): Allows the owner to execute the file (if it’s a program) or access the directory.
Group:

r: Allows members of the group to read the file or directory.
w: Allows members of the group to write to the file or directory.
x: Allows members of the group to execute the file (if it’s a program) or access the directory.
Others:

r: Allows other users (those who are not the owner or members of the group) to read the file or directory.
w: Allows other users to write to the file or directory.
x: Allows other users to execute the file (if it’s a program) or access the directory.
Each type of permission is represented by a number:

r (read) is represented by 4.
w (write) is represented by 2.
x (execute) is represented by 1.
To set permissions using chmod, you add up the numbers for each type of permission you want to grant. For example:

chmod 755 file.txt would give the owner of file.txt read, write, and execute permissions (7), and read and execute permissions to the group and others (5).
Remember, modifying permissions with chmod can have significant security implications, so it’s important to use it carefully and only grant the necessary permissions to users and groups.

36
Q

what does u , g and o stand for in chmod permissions

A

user -(owner)
group
other (everyone else)
eg. ugo+rwx would grant read, write, and execute permissions to the owner, the group, and others on a file or directory.

37
Q

what is linux

A

Linux is a free, open-source operating system that manages the communication between your software and hardware.

38
Q

What is Ubuntu?

A

Xubuntu is a version of Ubuntu that uses a different interface called XFCE, which is simpler and uses less computer resources .

39
Q

list the disk usage

A

du

40
Q

list the processes

A

ps

41
Q

Write entire content of the grep manual page into a file named hold, allowing you to review the manual’s contents at a later time using a text editor or another command like cat hold.

A

man grep > hold

42
Q

the name of a file where the output of the man grep command is being redirected and stored.

A

hold

43
Q

you have a left side program and a right side program. The pipe operator ‘|’ is between the two programs. The output data fro m the left side program will not be displayed on the terminal screen, instead it is redirected to the pipe.
Then, the right side program reads the data from the pipe as its input

A

cat hold | more

44
Q

Run every written line in the program with nano command.

A

bash (MyProgram)

45
Q

tail -8 passwd Displays the last 8 lines of the file passwd, typically located in the /etc directory. This file contains user account information.

A

tail -8 passwd

46
Q

what is a softlink

A

files that point to a file or directory in your system, but don’t mirror the other file’s data

47
Q

what is a hardlink

A

a direct reference to a file’s data on the disk. It has the same name, inode number, and permissions as the original file. You can create a hard link with the. ln. command, without any options.

48
Q
A