diff --git a/.gitignore b/.gitignore index 99aa386..2cce34c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ src-local/instance/ src-local/hybrid/connect/ src-local/hybrid/keys.json src-local/logs +src-local/LabLearningObject-hybrid-tmp/ vimsession swarmlabdoc.js diff --git a/src-local/LabLearningObject-hybrid-tmp/0344pnfw6xd4.html b/src-local/LabLearningObject-hybrid-tmp/0344pnfw6xd4.html deleted file mode 100644 index a5dae75..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/0344pnfw6xd4.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/0ajszhq4ez8f.html b/src-local/LabLearningObject-hybrid-tmp/0ajszhq4ez8f.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/0ajszhq4ez8f.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/0hd24n8mvc5m.html b/src-local/LabLearningObject-hybrid-tmp/0hd24n8mvc5m.html deleted file mode 100644 index e3cf597..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/0hd24n8mvc5m.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/0uay73d8fdcd.html b/src-local/LabLearningObject-hybrid-tmp/0uay73d8fdcd.html deleted file mode 100644 index 195282b..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/0uay73d8fdcd.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

-
-

An operating system kernel that allows multitasking needs processes to have certain states. Names for these states are not standardised, but they have similar functionality.

-
-
-
- -
-
    -
  • -

    the process is "created".

    -
  • -
  • -

    After that the process scheduler assigns it the "waiting" state.

    -
  • -
  • -

    While the process is "waiting", it waits for the scheduler to do a so-called context switch.

    -
  • -
  • -

    The context switch loads the process into the processor and changes the state to "running" while the previously "running" process is stored in a "waiting" state.

    -
  • -
  • -

    If a process in the "running" state needs to wait for a resource, it is assigned the "blocked" state.

    -
  • -
  • -

    The process state is changed back to "waiting" when the process no longer needs to wait (in a blocked state).

    -
  • -
  • -

    Once the process finishes execution, or is terminated by the operating system, it is no longer needed.

    -
  • -
  • -

    The process is removed instantly or is moved to the "terminated" state.

    -
  • -
  • -

    When removed, it just waits to be removed from main memory.

    -
  • -
-
-
-
-
-
-

2.3. Inter-process communication

-
-

When processes need to communicate with each other they must share parts of their address spaces or use other forms of inter-process communication (IPC).

-
-
-
    -
  • -

    For instance in a shell pipeline, the output of the first process need to pass to the second one.

    -
  • -
  • -

    another example is a task that can be decomposed into cooperating but partially independent processes which can run at once

    -
    -
      -
    • -

      (i.e., using concurrency, or true parallelism - the latter model is a particular case of concurrent execution and is feasible whenever enough CPU cores are available for all the processes that are ready to run).

      -
    • -
    -
    -
  • -
-
-
- - - - - -
- - -It is even possible for two or more processes to be running on different machines that may run different operating system (OS), therefore some mechanisms for communication and synchronization (called communications protocols for distributed computing) are needed (e.g., the Message Passing Interface, often simply called MPI). -
-
-
-

2.3.1. communication between processes

-
-

Processes can communicate with each other through:

-
-
-
    -
  • -

    Shared Memory

    -
  • -
  • -

    Message passing

    -
  • -
-
-
-
- - -
-
-
-

[1]

-
-
-
-
-
-
-
-
-
-1. https://www.geeksforgeeks.org/inter-process-communication-ipc/ -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/0uidbgygmbl.html b/src-local/LabLearningObject-hybrid-tmp/0uidbgygmbl.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/0uidbgygmbl.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/16io1pej22v.html b/src-local/LabLearningObject-hybrid-tmp/16io1pej22v.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/16io1pej22v.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/17cwobmozo8.html b/src-local/LabLearningObject-hybrid-tmp/17cwobmozo8.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/17cwobmozo8.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/19c9pc.html b/src-local/LabLearningObject-hybrid-tmp/19c9pc.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/19c9pc.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/19k5t7bavu.html b/src-local/LabLearningObject-hybrid-tmp/19k5t7bavu.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/19k5t7bavu.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/1afnbdhzmw2.html b/src-local/LabLearningObject-hybrid-tmp/1afnbdhzmw2.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/1afnbdhzmw2.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/1phnqpkvfry.html b/src-local/LabLearningObject-hybrid-tmp/1phnqpkvfry.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/1phnqpkvfry.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/1q8jd9ootbii.html b/src-local/LabLearningObject-hybrid-tmp/1q8jd9ootbii.html deleted file mode 100644 index 195282b..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/1q8jd9ootbii.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

-
-

An operating system kernel that allows multitasking needs processes to have certain states. Names for these states are not standardised, but they have similar functionality.

-
-
-
- -
-
    -
  • -

    the process is "created".

    -
  • -
  • -

    After that the process scheduler assigns it the "waiting" state.

    -
  • -
  • -

    While the process is "waiting", it waits for the scheduler to do a so-called context switch.

    -
  • -
  • -

    The context switch loads the process into the processor and changes the state to "running" while the previously "running" process is stored in a "waiting" state.

    -
  • -
  • -

    If a process in the "running" state needs to wait for a resource, it is assigned the "blocked" state.

    -
  • -
  • -

    The process state is changed back to "waiting" when the process no longer needs to wait (in a blocked state).

    -
  • -
  • -

    Once the process finishes execution, or is terminated by the operating system, it is no longer needed.

    -
  • -
  • -

    The process is removed instantly or is moved to the "terminated" state.

    -
  • -
  • -

    When removed, it just waits to be removed from main memory.

    -
  • -
-
-
-
-
-
-

2.3. Inter-process communication

-
-

When processes need to communicate with each other they must share parts of their address spaces or use other forms of inter-process communication (IPC).

-
-
-
    -
  • -

    For instance in a shell pipeline, the output of the first process need to pass to the second one.

    -
  • -
  • -

    another example is a task that can be decomposed into cooperating but partially independent processes which can run at once

    -
    -
      -
    • -

      (i.e., using concurrency, or true parallelism - the latter model is a particular case of concurrent execution and is feasible whenever enough CPU cores are available for all the processes that are ready to run).

      -
    • -
    -
    -
  • -
-
-
- - - - - -
- - -It is even possible for two or more processes to be running on different machines that may run different operating system (OS), therefore some mechanisms for communication and synchronization (called communications protocols for distributed computing) are needed (e.g., the Message Passing Interface, often simply called MPI). -
-
-
-

2.3.1. communication between processes

-
-

Processes can communicate with each other through:

-
-
-
    -
  • -

    Shared Memory

    -
  • -
  • -

    Message passing

    -
  • -
-
-
-
- - -
-
-
-

[1]

-
-
-
-
-
-
-
-
-
-1. https://www.geeksforgeeks.org/inter-process-communication-ipc/ -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/1qxpjt.html b/src-local/LabLearningObject-hybrid-tmp/1qxpjt.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/1qxpjt.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/1ws0o15jjqo.html b/src-local/LabLearningObject-hybrid-tmp/1ws0o15jjqo.html deleted file mode 100644 index b6c4423..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/1ws0o15jjqo.html +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-
-
-
-
Life cycle of a process
-
-
- -
-

fork() is the the system call that the parent process uses to "divide" itself ("fork") into two identical processes.

-
-
-
    -
  • -

    After calling fork(), the created child process is an exact copy of the parent except for the return value of the fork() call.

    -
    -
      -
    • -

      This includes open files, register state, and all memory allocations, which includes the program’s executable code. In some cases the two continue to run the same binary,

      -
    • -
    -
    -
  • -
  • -

    the child switches to running another binary executable using the exec() system call.

    -
  • -
-
-
-
-
-
-
-
-
-

1. Life cycle of a process

-
-
-
    -
  • -

    When a process forks, a complete copy of the executing program is made into the new process.

    -
    -
      -
    • -

      This new process is a child of the parent process, and has a new process identifier (PID).

      -
    • -
    -
    -
  • -
  • -

    The fork() function returns the child’s PID to the parent process.

    -
    -
      -
    • -

      The fork() function returns 0 to the child process.

      -
    • -
    • -

      This enables the two identical processes to distinguish one another.

      -
    • -
    -
    -
  • -
  • -

    The parent process can either continue execution or wait for the child process to complete.

    -
  • -
  • -

    The child, after discovering that it is the child, replaces itself completely with another program, so that the code and address space of the original program are lost.

    -
  • -
  • -

    If the parent chooses to wait for the child to die, then the parent will receive the exit code of the program that the child executed.

    -
  • -
  • -

    To prevent the child becoming a zombie the parent should call wait on its children, either periodically or upon receiving the SIGCHLD signal, which indicates a child process has terminated.

    -
  • -
  • -

    One can also asynchronously wait on their children to finish, by using a signal handler for SIGCHLD, if they need to ensure everything is cleaned up.

    -
  • -
-
-
- - - - - -
- - -
-
    -
  • -

    When the child process calls exec(), all data in the original program is lost, and it is replaced with a running copy of the new program.

    -
    -
      -
    • -

      This is known as overlaying.

      -
    • -
    -
    -
  • -
  • -

    Although all data are replaced, the file descriptors that were open in the parent are closed only if the program has explicitly marked them close-on-exec.

    -
  • -
  • -

    This allows for the common practice of the parent creating a pipe prior to calling fork() and using it to communicate with the executed program.

    -
  • -
-
-
-
-
-

1.1. copy-on-write

-
-
-
All processes are sharing the same set of pages and each one gets its own private copy when it wants to modify a page.
-
-
-
-

In such cases, a technique called copy-on-write (COW) is used.

-
-
-

With this technique, when a fork occurs, the parent process’s pages are not copied for the child process.

-
-
-

Instead, the pages are shared between the child and the parent process.

-
-
-

Whenever a process (parent or child) modifies a page, a separate copy of that particular page alone is made for that process (parent or child) which performed the modification.

-
-
-

This process will then use the newly copied page rather than the shared one in all future references. -The other process (the one which did not modify the shared page) continues to use the original copy of the page (which is now no longer shared). This technique is called copy-on-write since the page is copied when some process writes to it.

-
-
- - - - - -
- - -
-

copy-on-write is lazy copying, child process copy the page when try to write it.

-
-
-

So basically, after a fork, almost child’s memory is shared with parent.

-
-
-

Before any of the processes made, every child process still have some private memory, modified from parent’s or new allocating.

-
-
-

That means even without any action the forked child process has some private memory.

-
-
-

We can verify it with

-
-
-
-
cat /proc/PID/smaps
-or
-pmap  PID
-
-
-
-
-
- - - - - -
- - -
-

This operation avoids unnecessary overhead because copying an entire address space is a very slow and inefficient operation which uses a lot of processor time and resources.

-
-
-
-
-
-

1.2. Zombie processes

-
-
-
A child process always first becomes a zombie before being removed from the resource table.
-
-
-
-

When a process ends via exit, all of the memory and resources associated with it are deallocated so they can be used by other processes.

-
-
-

The process’s entry in the process table remains.

-
-
-

The parent can read the child’s exit status by executing the wait system call, whereupon the zombie is removed.

-
-
-

The wait call may be executed in sequential code, but it is commonly executed in a handler for the SIGCHLD signal, which the parent receives whenever a child has died.

-
-
- - - - - -
- - -
-

In most cases, under normal system operation zombies are immediately waited on by their parent and then reaped by the system – processes that stay zombies for a long time are generally an error and cause a resource leak, but the only resource they occupy is the process table entry – process ID.

-
-
-
-
It is not possible to kill such a process with the kill command, because it is already considered dead.
-You can kill the parent process and then the zombie disappears as well.
-
-Zombies can be identified in the output from the Unix ps command by the presence of a "Z" in the "STAT" column
-
-
-
-
-
-
-

1.3. wait

-
-
-
The child process will not be completely removed until the parent process knows of the termination of its child process by the wait() system call.
-
-
-
-

A process (or task) may wait on another process to complete its execution.

-
-
-

The parent process issue a wait system call, which suspends the execution of the parent process while the child executes.

-
-
-

When the child process terminates, it returns an exit status to the operating system, which is then returned to the waiting parent process.

-
-
-

The parent process then resumes execution.

-
-
-
-

1.4. Orphan process

-
-

A child process whose parent process terminates before it does becomes an orphan process.

-
-
-

Such situations are typically handled with a special "root" (or "init") process, which is assigned as the new parent of a process when its parent process exits.

-
-
-

This special process detects when an orphan process terminates and then retrieves its exit status, allowing the system to deallocate the terminated child process.

-
-
-
-

1.5. Process States

-
-
-
ps aux
-
-
-
-

In the STAT column, you’ll see:

-
-
-
    -
  • -

    R: running or runnable, it is just waiting for the CPU to process it

    -
  • -
  • -

    S: Interruptible sleep, waiting for an event to complete, such as input from the terminal

    -
  • -
  • -

    D: Uninterruptible sleep, processes that cannot be killed or interrupted with a signal, usually to make them go away you have to reboot or fix the issue

    -
  • -
  • -

    Z: Zombie, we discussed in a previous lesson that zombies are terminated processes that are waiting to have their statuses collected

    -
  • -
  • -

    T: Stopped, a process that has been suspended/stopped

    -
  • -
-
-
-
-
-
-

2. Thread

-
-
-
-
A thread is an execution unit that has its own program counter, a stack and a set of registers that reside in a process
-
-
-
-

Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources.

-
-
-

The threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variables at any given time.

-
-
-
- -
-

Threads in the same process share:

-
-
-
    -
  • -

    Process instructions

    -
  • -
  • -

    open files, data

    -
  • -
  • -

    signals and signal handlers

    -
  • -
  • -

    current working directory

    -
  • -
  • -

    User and group id

    -
  • -
-
-
-
-
- - - - - -
- - -A thread is also called Light Weight Process (LWP). -
-
-
-

2.1. Implementations

-
-
    -
  • -

    LinuxThreads

    -
    -
      -
    • -

      The default thread implementation since Linux kernel 2.0 (introduced in 1996)

      -
    • -
    -
    -
  • -
  • -

    Native POSIX Thread Library (NPTL)

    -
    -
      -
    • -

      NPTL has been part of Red Hat Enterprise Linux since version 3, and in the Linux kernel since version 2.6. It is now a fully integrated part of the GNU C Library.

      -
    • -
    -
    -
  • -
  • -

    Next Generation POSIX Thread (NGPT)

    -
    -
      -
    • -

      A IBM developed version of POSIX thread library. The NGPT team collaborated closely with the NPTL team and combined the best features of both implementations into NPTL.

      -
    • -
    -
    -
  • -
-
-
-
-

2.2. Threads vs. processes pros and cons

-
-
    -
  • -

    processes are typically independent, while threads exist as subsets of a process

    -
  • -
  • -

    processes carry considerably more state information than threads, whereas multiple threads within a process share process state as well as memory and other resources

    -
  • -
  • -

    processes have separate address spaces, whereas threads share their address space

    -
  • -
  • -

    processes interact only through system-provided inter-process communication mechanisms

    -
  • -
  • -

    context switching between threads in the same process typically occurs faster than context switching between processes

    -
  • -
-
-
-

Advantages and disadvantages of threads vs processes include:

-
-
-
    -
  • -

    Lower resource consumption of threads: using threads, an application can operate using fewer resources than it would need when using multiple processes.

    -
  • -
  • -

    Simplified sharing and communication of threads: unlike processes, which require a message passing or shared memory mechanism to perform inter-process communication (IPC), threads can communicate through data, code and files they already share.

    -
  • -
-
-
- - - - - -
- - -Thread crashes a process: due to threads sharing the same address space, an illegal operation performed by a thread can crash the entire process; therefore, one misbehaving thread can disrupt the processing of all the other threads in the application. -
-
-
-

2.2.1. When should you prefer fork() over threading and vice-verse?

-
-

When you’re doing a far more complex task than just instantiating a worker, or you want the implicit security sandboxing of separate processes.

-
-
-
-

2.2.2. If I want to call an external application as a child, then should I use fork() or threads to do it?

-
-

If the child will do an identical task to the parent, with identical code, use fork. For smaller subtasks use threads.

-
-
-
-

2.2.3. it is bad thing to call a fork() inside a thread?

-
-

it’s computationally rather expensive to duplicate a process and a lot of subthreads.

-
-
-
-
-
-
-

3. Process Memory

-
-
-
-
A process uses its own memory area to perform work.
-
-
-
-
- -
-
    -
  • -

    Text Segment.

    -
    -
      -
    • -

      The Text segment (a.k.a the Instruction segment) contains the executable program code and constant data.

      -
    • -
    -
    -
  • -
  • -

    Data Segment

    -
    -
      -
    • -

      Heap

      -
      -
        -
      • -

        Heap is the segment from which the memory is provided. (e.g. malloc())

        -
      • -
      -
      -
    • -
    • -

      BSS:

      -
      -
        -
      • -

        The area where zero-initialized data is stored. All the global variable which are not initialized in the program are stored in the BSS segment.

        -
      • -
      -
      -
    • -
    • -

      Data:

      -
      -
        -
      • -

        The area where initialized data are stored.

        -
      • -
      -
      -
    • -
    -
    -
  • -
  • -

    Stack Segment

    -
    -
      -
    • -

      The stack segment is used by the process for the storage of automatic identifier, register variables, and function call information.

      -
    • -
    -
    -
  • -
-
-
-
-
-
what process is attached to a shared memory segment?
-
-
You can use:
-ipcs -mp to get the process ID
-and
-with the command grep [shared memory segment] /proc/*/maps
-
-
-
- - - - - -
- - -ipcs shows information on the inter-process communication facilities for which the calling process has read access. -By default it shows information about all three resources: shared memory segments, message queues, and semaphore arrays. -
-
-
-
-
-

4. Process priority (nice)

-
-
-

In Linux we can set guidelines for the CPU to follow when it is looking at all the tasks it has to do. -These guidelines are called niceness or nice value.

-
-
-

The "niceness" scale goes from

-
-
-
    -
  • -

    -20 (highest priority value)

    -
  • -
  • -

    19 (lowest priority value)

    -
  • -
  • -

    default is 0

    -
  • -
-
-
-

The nice priority is actually used for user programs.

-
-
- - - - - -
- - -Priority is all about managing processor time -
-
-
-
-
nice  run a program with modified scheduling priority
-chrt  allows to set your scheduling policy as well as priority.
-
-
-
-
-
-

5. Scheduler

-
-
-
- -
-
-
The scheduler is the Linux kernel part that decides which runnable process will be executed by the CPU next.
-
-
-
-

It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

-
-
-
-
- - - - - -
- - -
-

The scheduler makes it possible to execute multiple programs at the same time, thus sharing the CPU with users of varying needs.

-
-
-
    -
  • -

    Minimizing response time

    -
  • -
  • -

    Maximizing overall CPU utilization

    -
  • -
-
-
-
-
- - - - - -
- - -Since Linux 2.6.23, the default scheduler is CFS, the "Completely Fair Scheduler". The - CFS scheduler replaced the earlier "O(1)" scheduler. [5] [6] -
-
-
-
-
-

6. Context switching

-
-
-

Context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point. -This allows multiple processes to share a single central processing unit (CPU), and is an essential feature of a multitasking operating system.

-
-
-

In the Linux kernel, context switching involves

-
-
-
    -
  • -

    switching registers

    -
  • -
  • -

    stack pointer

    -
  • -
  • -

    program counter

    -
  • -
  • -

    flushing the translation lookaside buffer (TLB)

    -
  • -
  • -

    and loading the page table of the next process to run (unless the old process shares the memory with the new).

    -
  • -
-
-
-
-
-

7. Interrupts

-
-
-

An interrupt is an event that alters the normal execution flow of a program and can be generated by hardware devices or even by the CPU itself.

-
-
-

Interrupts can be grouped into two categories based on the source of the interrupt:

-
-
-
    -
  • -

    synchronous, generated by executing an instruction

    -
  • -
  • -

    asynchronous, generated by an external event

    -
    -
      -
    • -

      For example a network card generates an interrupts to signal that a packet has arrived.

      -
    • -
    -
    -
  • -
-
-
-
-
Information related to hard interrupts at /proc/interrupts
-
-
-
-
-
-
-
-
-1. http://www.it.uu.se/education/course/homepage/os/vt18/images/module-2/fork-exec-exit-wait.png -
-
-2. https://commons.wikimedia.org/w/index.php?curid=2233446 -
-
-3. https://gabrieletolomei.files.wordpress.com/2013/10/program_in_memory2.png?w=960 -
-
-4. By ScotXW - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=47075153 -
-
-5. https://en.wikipedia.org/wiki/Completely_Fair_Scheduler -
-
-6. https://www.kernel.org/doc/html/latest/scheduler/index.html -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/2rhwqkk4wrm.html b/src-local/LabLearningObject-hybrid-tmp/2rhwqkk4wrm.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/2rhwqkk4wrm.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/2tieqo89vif.html b/src-local/LabLearningObject-hybrid-tmp/2tieqo89vif.html deleted file mode 100644 index 22f8d55..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/2tieqo89vif.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - - - -Asciidoctor Demo - - - - - - -
-
-
-
-

This is a demonstration of Asciidoctor. And this is the preamble of this document.

-
-
-
-
Purpose
-
-

This document exercises many of the features of AsciiDoc to test the Asciidoctor implementation.

-
-
-
-
- - - - - -
- - -If you want the output to look familiar, copy (or link) the AsciiDoc stylesheet, asciidoc.css, to the output directory. -
-
-
- - - - - -
- - -Items marked with TODO are either not yet supported or a work in progress. -
-
-
-
-
-

1. First Steps with AsciiDoc

-
-
-
Inline markup
-
    -
  • -

    single quotes around a phrase place emphasis

    -
  • -
  • -

    astericks around a phrase make the text bold

    -
  • -
  • -

    double astericks around one or more letters in a word make those letters bold

    -
  • -
  • -

    double underscore around a substring in a word emphasize that substring

    -
  • -
  • -

    use carrots around characters to make them superscript

    -
  • -
  • -

    use tildes around characters to make them subscript

    -
  • -
  • -

    to pass through HTML directly, surround the text with triple plus

    -
  • -
-
-
-
    -
  • -

    characters can be escaped using a \

    -
    -
      -
    • -

      for instance, you can escape a quote inside emphasized text like Here's Johnny!

      -
    • -
    -
    -
  • -
  • -

    you can safely use reserved XML characters like <, > and &, which are escaped when rendering

    -
  • -
  • -

    force a space between inline elements using the {sp} attribute

    -
  • -
  • -

    hold text together with an intrinsic non-breaking space attribute, {nbsp}

    -
  • -
  • -

    handle words with unicode characters like in the name Gregory Romé

    -
  • -
  • -

    claim your copyright ©, registered trademark ® or trademark ™

    -
  • -
-
-
-

You can write text with inline links, optionally using an explicit link prefix. In either case, the link can have a query string.

-
-
-

If you want to break a line
-just end it in a + sign
-and continue typing on the next line.

-
-
-

1.1. Lists Upon Lists

-
-
Adjacent lists
-
    -
  • -

    this list

    -
  • -
  • -

    should join

    -
  • -
  • -

    to have

    -
  • -
  • -

    four items

    -
  • -
-
-
-
Numbered lists
-
    -
  1. -

    These items

    -
  2. -
  3. -

    will be auto-numbered

    -
    -
      -
    1. -

      and can be nested

      -
    2. -
    -
    -
  4. -
  5. -

    A numbered list can nest

    -
    -
      -
    • -

      unordered

      -
    • -
    • -

      list

      -
    • -
    • -

      items

      -
    • -
    -
    -
  6. -
-
-
-
Statement
-

I swear I left it in Guy's car. Let's go look for it.

-
-
-
-
term
-
-

definition -line two

-
-
another term
-
-

another definition, which can be literal (indented) or regular paragraph

-
-
-
-
-

This should be a standalone paragraph, not grabbed by the definition list.

-
-
-
    -
  • -

    first level -written on two lines

    -
  • -
  • -

    first level

    -
    -
    -
    with this literal text
    -
    -
    -
    -
      -
    • -

      second level

      -
      -
        -
      • -

        third level

        -
        -
          -
        • -

          fourth level

          -
        • -
        -
        -
      • -
      -
      -
    • -
    -
    -
  • -
  • -

    back to
    -first level

    -
  • -
-
-
-

Let’s make a horizontal rule…​

-
-
-
-

then take a break.

-
-
-
-
-
-

2. We’re back!

-
-
-

Want to see a Tiger?

-
-
-

Do you feel safer with the tiger in a box?

-
-
-
-tiger -
-
Figure 1. Tiger in a box
-
-
-

<!DOCTYPE html> -<html lang=""> - <head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width,initial-scale=1.0"> - <title>Vue App</title> - <link href="/js/app.js" rel="preload" as="script"><link href="/js/chunk-vendors.js" rel="preload" as="script"></head> - <body> - <div id="app"></div> - <script type="text/javascript" src="/js/chunk-vendors.js"></script><script type="text/javascript" src="/js/app.js"></script></body> -</html>

-
-
-
Asciidoctor usage example, should contain 3 lines
-
-
doc = Asciidoctor::Document.new("*This* is it!", :header_footer => false)
-
-puts doc.render
-
-
-
-

Here’s what it outputs (using the built-in templates):

-
-
-
-
<div class="paragraph">
-  <p><strong>This</strong> is it!</p>
-</div>
-
-
-
-

2.1. “Quotes”

-
-
-
-

AsciiDoc is so powerful!

-
-
-
-
-

This verse comes to mind.

-
-
-
La la la
-
-
-

Here’s another quote:

-
-
-
-
-

When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.

-
-
-
-— Sir Arthur Conan Doyle
-The Adventures of Sherlock Holmes -
-
-
-
-
-
-

3. Getting Literal

-
-
-
-
Want to get literal? Just prefix a line with a space (just one will do).
-
-
-
-
-
I'll join that party, too.
-
-
-
-

We forgot to mention in Numbered lists that you can change the numbering style.

-
-
-
    -
  1. -

    first item (yeah!)

    -
  2. -
  3. -

    second item, looking so mono

    -
  4. -
  5. -

    third item, mono it is!

    -
  6. -
-
-
-
-
-

4. Wrap-up

-
-
- - - - - -
- - -AsciiDoc is quite cool, you should try it! -
-
-
- - - - - -
- - -
Info
-
-

Go to this URL to learn more about it:

-
- -
-

Or you could return to the First Steps or Purpose.

-
-
-
-
-

Here’s a reference to the definition of another term, in case you forgot it.

-
-
- - - - - -
- - -One more thing. Happy documenting! -
-
-
-

When all else fails, head over to http://google.com.

-
-
-
-
- - - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/319kyrwive.html b/src-local/LabLearningObject-hybrid-tmp/319kyrwive.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/319kyrwive.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/32do4bivggp.html b/src-local/LabLearningObject-hybrid-tmp/32do4bivggp.html deleted file mode 100644 index a5dae75..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/32do4bivggp.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/38lhb.html b/src-local/LabLearningObject-hybrid-tmp/38lhb.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/38lhb.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/3c8uxdoe3uu.html b/src-local/LabLearningObject-hybrid-tmp/3c8uxdoe3uu.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/3c8uxdoe3uu.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/3evffi.html b/src-local/LabLearningObject-hybrid-tmp/3evffi.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/3evffi.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/3rzj4jh6hoa.html b/src-local/LabLearningObject-hybrid-tmp/3rzj4jh6hoa.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/3rzj4jh6hoa.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/3te3bmpxzfl.html b/src-local/LabLearningObject-hybrid-tmp/3te3bmpxzfl.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/3te3bmpxzfl.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/3tkemg3auu4.html b/src-local/LabLearningObject-hybrid-tmp/3tkemg3auu4.html deleted file mode 100644 index 9c97878..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/3tkemg3auu4.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/4b7t3lv3jpx.html b/src-local/LabLearningObject-hybrid-tmp/4b7t3lv3jpx.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/4b7t3lv3jpx.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/4btap7h39qf.html b/src-local/LabLearningObject-hybrid-tmp/4btap7h39qf.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/4btap7h39qf.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/4x5g88x91hq.html b/src-local/LabLearningObject-hybrid-tmp/4x5g88x91hq.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/4x5g88x91hq.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/50t9m85xl7r.html b/src-local/LabLearningObject-hybrid-tmp/50t9m85xl7r.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/50t9m85xl7r.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/52hxqv8oud8.html b/src-local/LabLearningObject-hybrid-tmp/52hxqv8oud8.html deleted file mode 100644 index dff2c6a..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/52hxqv8oud8.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/5khqgmlerke.html b/src-local/LabLearningObject-hybrid-tmp/5khqgmlerke.html deleted file mode 100644 index 212dfea..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/5khqgmlerke.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Managing software

-
-
-

1.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

1.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

1.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

1.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

1.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

1.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

1.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/5n1fhh.html b/src-local/LabLearningObject-hybrid-tmp/5n1fhh.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/5n1fhh.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/5qvy432j0ci.html b/src-local/LabLearningObject-hybrid-tmp/5qvy432j0ci.html deleted file mode 100644 index 212dfea..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/5qvy432j0ci.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Managing software

-
-
-

1.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

1.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

1.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

1.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

1.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

1.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

1.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/5u9f3j9feiw.html b/src-local/LabLearningObject-hybrid-tmp/5u9f3j9feiw.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/5u9f3j9feiw.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/5w8xro98amb.html b/src-local/LabLearningObject-hybrid-tmp/5w8xro98amb.html deleted file mode 100644 index fa85fef..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/5w8xro98amb.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Find and grep

-
-
-

1.1. find

-
-

The find tool, known from UNIX, is very powerful. This command not only allows you to search file names, it can also accept file size, date of last change and other file properties as criteria for a search.

-
-
-

The most common use is for finding file names:

-
-
- - - - - -
- - -find <path> -name <searchstring> -
-
-
-

This can be interpreted as "Look in all files and subdirectories contained in a given path, and print the names of the files containing the search string in their name" (not in their content).

-
-
-
-
 find /etc -name "*.conf"
-
-
-
-
-

1.2. grep

-
-

grep is used for filtering input lines and returning certain patterns to the output.

-
-
- - - - - -
- - -grep "string" path/to/file -
-
-
-
-
 grep "root" /etc/passwd
-
-
-
-
-

1.3. find and grep command together

-
-

find /etc -name "*.conf" -exec grep -Hns "conf" {} \;

-
-
-
Explanation
-
-
-H, --with-filename
-      Print the filename for each match
--n, --line-number
-      Prefix each line of output with the 1-based line number within its input file
--s, --no-messages
-      Suppress error messages about nonexistent or unreadable files.
-
-
-
- - - - - -
- - -This can be interpreted as
-- "Look for *.conf files and subdirectories contained in /etc, and if true exec grep -Hns conf in the given file" -
-
-
- - - - - -
- - -Very powerful in bash scripts -create a file test.sh -
-
-
-
bash script
-
-
#!/bin/bash
-STRING=$(find /etc -name "*.conf" -exec grep -Hns "conf" {} \;)
-echo $STRING
-
-
-
-

exec it

-
-
-
bash script
-
-
chmod 700 test.sh
-./test.sh
-
-
-
-


-
-

-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/647y9gwfod9.html b/src-local/LabLearningObject-hybrid-tmp/647y9gwfod9.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/647y9gwfod9.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/6axg9enyl7.html b/src-local/LabLearningObject-hybrid-tmp/6axg9enyl7.html deleted file mode 100644 index 5a7011f..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/6axg9enyl7.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

- -
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/6edtl.html b/src-local/LabLearningObject-hybrid-tmp/6edtl.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/6edtl.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/6glg6tyt9tb.html b/src-local/LabLearningObject-hybrid-tmp/6glg6tyt9tb.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/6glg6tyt9tb.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/6kupcd1kodm.html b/src-local/LabLearningObject-hybrid-tmp/6kupcd1kodm.html deleted file mode 100644 index 687ac48..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/6kupcd1kodm.html +++ /dev/null @@ -1,719 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
- - - - - -
- - -
NOTE
-
-

Assuming you’re already logged in

-
-
-
-
-
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-
-
-
-
-

2. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 6. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-
-
-

3. Find and grep

-
-
-

3.1. find

-
-

The find tool, known from UNIX, is very powerful. This command not only allows you to search file names, it can also accept file size, date of last change and other file properties as criteria for a search.

-
-
-

The most common use is for finding file names:

-
-
- - - - - -
- - -find <path> -name <searchstring> -
-
-
-

This can be interpreted as "Look in all files and subdirectories contained in a given path, and print the names of the files containing the search string in their name" (not in their content).

-
-
-
-
 find /etc -name "*.conf"
-
-
-
-
-

3.2. grep

-
-

grep is used for filtering input lines and returning certain patterns to the output.

-
-
- - - - - -
- - -grep "string" path/to/file -
-
-
-
-
 grep "root" /etc/passwd
-
-
-
-
-

3.3. find and grep command together

-
-

find /etc -name "*.conf" -exec grep -Hns "conf" {} \;

-
-
-
Explanation
-
-
-H, --with-filename
-      Print the filename for each match
--n, --line-number
-      Prefix each line of output with the 1-based line number within its input file
--s, --no-messages
-      Suppress error messages about nonexistent or unreadable files.
-
-
-
- - - - - -
- - -This can be interpreted as
-- "Look for *.conf files and subdirectories contained in /etc, and if true exec grep -Hns conf in the given file" -
-
-
- - - - - -
- - -Very powerful in bash scripts -create a file test.sh -.bash script -
-
-
-
-
#!/bin/bash
-STRING=$(find /etc -name "*.conf" -exec grep -Hns "conf" {} \;)
-echo $STRING
-
-
-
-

exec it -.bash script

-
-
-
-
chmod 700 test.sh
-./test.sh
-
-
-
-
-
-
-

4. Managing software

-
-
-

4.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

4.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

4.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

4.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

4.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

4.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

4.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
- - - - - -
- - -
Reminder
-
-

Caminante, no hay camino,
-se hace camino al andar.

-
-
-

Wanderer, there is no path,
-the path is made by walking.

-
-
-

Antonio Machado Campos de Castilla

-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/6tcftt.html b/src-local/LabLearningObject-hybrid-tmp/6tcftt.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/6tcftt.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/6thjb5rlbdu.html b/src-local/LabLearningObject-hybrid-tmp/6thjb5rlbdu.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/6thjb5rlbdu.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/75jkqov60ls.html b/src-local/LabLearningObject-hybrid-tmp/75jkqov60ls.html deleted file mode 100644 index 206ae57..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/75jkqov60ls.html +++ /dev/null @@ -1,714 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
- - - - - -
- - -
NOTE
-
-

Assuming you’re already logged in

-
-
-
-
-
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-
-
-
-
-

2. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 6. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-
-
-

3. Find and grep

-
-
-

3.1. find

-
-

The find tool, known from UNIX, is very powerful. This command not only allows you to search file names, it can also accept file size, date of last change and other file properties as criteria for a search.

-
-
-

The most common use is for finding file names:

-
-
- - - - - -
- - -find <path> -name <searchstring> -
-
-
-

This can be interpreted as "Look in all files and subdirectories contained in a given path, and print the names of the files containing the search string in their name" (not in their content).

-
-
-
-
 find /etc -name "*.conf"
-
-
-
-
-

3.2. grep

-
-

grep is used for filtering input lines and returning certain patterns to the output.

-
-
- - - - - -
- - -grep "string" path/to/file -
-
-
-
-
 grep "root" /etc/passwd
-
-
-
-
-

3.3. find and grep command together

-
-

find /etc -name "*.conf" -exec grep -Hns "conf" {} \;

-
-
-
Explanation
-
-
-H, --with-filename
-      Print the filename for each match
--n, --line-number
-      Prefix each line of output with the 1-based line number within its input file
--s, --no-messages
-      Suppress error messages about nonexistent or unreadable files.
-
-
-
- - - - - -
- - -This can be interpreted as
-- "Look for *.conf files and subdirectories contained in /etc, and if true exec grep -Hns conf in the given file" -
-
-
- - - - - -
- - -Very powerful in bash scripts -create a file test.sh -.bash script -
-
-
-
-
#!/bin/bash
-STRING=$(find /etc -name "*.conf" -exec grep -Hns "conf" {} \;)
-echo $STRING
-
-
-
-

exec it -.bash script

-
-
-
-
chmod 700 test.sh
-./test.sh
-
-
-
-
-
-
-

4. Managing software

-
-
-

4.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

4.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

4.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

4.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

4.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

4.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

4.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
- - - - - -
- - -
Reminder
-
-

Caminante, no hay camino,
-se hace camino al andar.

-
-
-

Wanderer, there is no path,
-the path is made by walking.

-
-
-

Antonio Machado Campos de Castilla

-
-
-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/7a64ccveml.html b/src-local/LabLearningObject-hybrid-tmp/7a64ccveml.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/7a64ccveml.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/7aot7uvycir.html b/src-local/LabLearningObject-hybrid-tmp/7aot7uvycir.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/7aot7uvycir.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/7du1hqyyq1g.html b/src-local/LabLearningObject-hybrid-tmp/7du1hqyyq1g.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/7du1hqyyq1g.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/7svezi.html b/src-local/LabLearningObject-hybrid-tmp/7svezi.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/7svezi.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/7u5mqneov0r.html b/src-local/LabLearningObject-hybrid-tmp/7u5mqneov0r.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/7u5mqneov0r.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/7wyz2fc6rmv.html b/src-local/LabLearningObject-hybrid-tmp/7wyz2fc6rmv.html deleted file mode 100644 index 342b074..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/7wyz2fc6rmv.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Exercise

-
- -
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/83hh8g.html b/src-local/LabLearningObject-hybrid-tmp/83hh8g.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/83hh8g.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/84g6zmr99db.html b/src-local/LabLearningObject-hybrid-tmp/84g6zmr99db.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/84g6zmr99db.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/84i403dutaw.html b/src-local/LabLearningObject-hybrid-tmp/84i403dutaw.html deleted file mode 100644 index 195282b..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/84i403dutaw.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

-
-

An operating system kernel that allows multitasking needs processes to have certain states. Names for these states are not standardised, but they have similar functionality.

-
-
-
- -
-
    -
  • -

    the process is "created".

    -
  • -
  • -

    After that the process scheduler assigns it the "waiting" state.

    -
  • -
  • -

    While the process is "waiting", it waits for the scheduler to do a so-called context switch.

    -
  • -
  • -

    The context switch loads the process into the processor and changes the state to "running" while the previously "running" process is stored in a "waiting" state.

    -
  • -
  • -

    If a process in the "running" state needs to wait for a resource, it is assigned the "blocked" state.

    -
  • -
  • -

    The process state is changed back to "waiting" when the process no longer needs to wait (in a blocked state).

    -
  • -
  • -

    Once the process finishes execution, or is terminated by the operating system, it is no longer needed.

    -
  • -
  • -

    The process is removed instantly or is moved to the "terminated" state.

    -
  • -
  • -

    When removed, it just waits to be removed from main memory.

    -
  • -
-
-
-
-
-
-

2.3. Inter-process communication

-
-

When processes need to communicate with each other they must share parts of their address spaces or use other forms of inter-process communication (IPC).

-
-
-
    -
  • -

    For instance in a shell pipeline, the output of the first process need to pass to the second one.

    -
  • -
  • -

    another example is a task that can be decomposed into cooperating but partially independent processes which can run at once

    -
    -
      -
    • -

      (i.e., using concurrency, or true parallelism - the latter model is a particular case of concurrent execution and is feasible whenever enough CPU cores are available for all the processes that are ready to run).

      -
    • -
    -
    -
  • -
-
-
- - - - - -
- - -It is even possible for two or more processes to be running on different machines that may run different operating system (OS), therefore some mechanisms for communication and synchronization (called communications protocols for distributed computing) are needed (e.g., the Message Passing Interface, often simply called MPI). -
-
-
-

2.3.1. communication between processes

-
-

Processes can communicate with each other through:

-
-
-
    -
  • -

    Shared Memory

    -
  • -
  • -

    Message passing

    -
  • -
-
-
-
- - -
-
-
-

[1]

-
-
-
-
-
-
-
-
-
-1. https://www.geeksforgeeks.org/inter-process-communication-ipc/ -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/87h7inxr9qg.html b/src-local/LabLearningObject-hybrid-tmp/87h7inxr9qg.html deleted file mode 100644 index 9c97878..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/87h7inxr9qg.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/8r36ab9nf5m.html b/src-local/LabLearningObject-hybrid-tmp/8r36ab9nf5m.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/8r36ab9nf5m.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/8se1t71n9p7.html b/src-local/LabLearningObject-hybrid-tmp/8se1t71n9p7.html deleted file mode 100644 index dff2c6a..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/8se1t71n9p7.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/8uk8bmb5ef2.html b/src-local/LabLearningObject-hybrid-tmp/8uk8bmb5ef2.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/8uk8bmb5ef2.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/8yd5sr2kk7d.html b/src-local/LabLearningObject-hybrid-tmp/8yd5sr2kk7d.html deleted file mode 100644 index a0007bf..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/8yd5sr2kk7d.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

-
-

An operating system kernel that allows multitasking needs processes to have certain states. Names for these states are not standardised, but they have similar functionality.

-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/916plim6uu.html b/src-local/LabLearningObject-hybrid-tmp/916plim6uu.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/916plim6uu.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/93f5fugs1tb.html b/src-local/LabLearningObject-hybrid-tmp/93f5fugs1tb.html deleted file mode 100644 index 212dfea..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/93f5fugs1tb.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Managing software

-
-
-

1.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

1.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

1.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

1.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

1.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

1.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

1.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/98p2lr.html b/src-local/LabLearningObject-hybrid-tmp/98p2lr.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/98p2lr.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/99kzjb5x8m.html b/src-local/LabLearningObject-hybrid-tmp/99kzjb5x8m.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/99kzjb5x8m.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/9dddazn5zqm.html b/src-local/LabLearningObject-hybrid-tmp/9dddazn5zqm.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/9dddazn5zqm.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/9ev86wois4.html b/src-local/LabLearningObject-hybrid-tmp/9ev86wois4.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/9ev86wois4.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/9f51uydi5wd.html b/src-local/LabLearningObject-hybrid-tmp/9f51uydi5wd.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/9f51uydi5wd.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/9rkmk4um3bs.html b/src-local/LabLearningObject-hybrid-tmp/9rkmk4um3bs.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/9rkmk4um3bs.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/9s18a8.html b/src-local/LabLearningObject-hybrid-tmp/9s18a8.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/9s18a8.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/9vpwdtbji4w.html b/src-local/LabLearningObject-hybrid-tmp/9vpwdtbji4w.html deleted file mode 100644 index 9140409..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/9vpwdtbji4w.html +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-
-
-
-
Life cycle of a process
-
-
- -
-

fork() is the the system call that the parent process uses to "divide" itself ("fork") into two identical processes.

-
-
-
    -
  • -

    After calling fork(), the created child process is an exact copy of the parent except for the return value of the fork() call.

    -
    -
      -
    • -

      This includes open files, register state, and all memory allocations, which includes the program’s executable code. In some cases the two continue to run the same binary,

      -
    • -
    -
    -
  • -
  • -

    the child switches to running another binary executable using the exec() system call.

    -
  • -
-
-
-
-
-
-
-
-
-

1. Life cycle of a process

-
-
-
    -
  • -

    When a process forks, a complete copy of the executing program is made into the new process.

    -
    -
      -
    • -

      This new process is a child of the parent process, and has a new process identifier (PID).

      -
    • -
    -
    -
  • -
  • -

    The fork() function returns the child’s PID to the parent process.

    -
    -
      -
    • -

      The fork() function returns 0 to the child process.

      -
    • -
    • -

      This enables the two identical processes to distinguish one another.

      -
    • -
    -
    -
  • -
  • -

    The parent process can either continue execution or wait for the child process to complete.

    -
  • -
  • -

    The child, after discovering that it is the child, replaces itself completely with another program, so that the code and address space of the original program are lost.

    -
  • -
  • -

    If the parent chooses to wait for the child to die, then the parent will receive the exit code of the program that the child executed.

    -
  • -
  • -

    To prevent the child becoming a zombie the parent should call wait on its children, either periodically or upon receiving the SIGCHLD signal, which indicates a child process has terminated.

    -
  • -
  • -

    One can also asynchronously wait on their children to finish, by using a signal handler for SIGCHLD, if they need to ensure everything is cleaned up.

    -
  • -
-
-
- - - - - -
- - -
-
    -
  • -

    When the child process calls exec(), all data in the original program is lost, and it is replaced with a running copy of the new program.

    -
    -
      -
    • -

      This is known as overlaying.

      -
    • -
    -
    -
  • -
  • -

    Although all data are replaced, the file descriptors that were open in the parent are closed only if the program has explicitly marked them close-on-exec.

    -
  • -
  • -

    This allows for the common practice of the parent creating a pipe prior to calling fork() and using it to communicate with the executed program.

    -
  • -
-
-
-
-
-

1.1. copy-on-write

-
-
-
All processes are sharing the same set of pages and each one gets its own private copy when it wants to modify a page.
-
-
-
-

In such cases, a technique called copy-on-write (COW) is used.

-
-
-

With this technique, when a fork occurs, the parent process’s pages are not copied for the child process.

-
-
-

Instead, the pages are shared between the child and the parent process.

-
-
-

Whenever a process (parent or child) modifies a page, a separate copy of that particular page alone is made for that process (parent or child) which performed the modification.

-
-
-

This process will then use the newly copied page rather than the shared one in all future references. -The other process (the one which did not modify the shared page) continues to use the original copy of the page (which is now no longer shared). This technique is called copy-on-write since the page is copied when some process writes to it.

-
-
- - - - - -
- - -
-

copy-on-write is lazy copying, child process copy the page when try to write it.

-
-
-

So basically, after a fork, almost child’s memory is shared with parent.

-
-
-

Before any of the processes made, every child process still have some private memory, modified from parent’s or new allocating.

-
-
-

That means even without any action the forked child process has some private memory.

-
-
-

We can verify it with

-
-
-
-
cat /proc/PID/smaps
-or
-pmap  PID
-
-
-
-
-
- - - - - -
- - -
-

This operation avoids unnecessary overhead because copying an entire address space is a very slow and inefficient operation which uses a lot of processor time and resources.

-
-
-
-
-
-

1.2. Zombie processes

-
-
-
A child process always first becomes a zombie before being removed from the resource table.
-
-
-
-

When a process ends via exit, all of the memory and resources associated with it are deallocated so they can be used by other processes.

-
-
-

The process’s entry in the process table remains.

-
-
-

The parent can read the child’s exit status by executing the wait system call, whereupon the zombie is removed.

-
-
-

The wait call may be executed in sequential code, but it is commonly executed in a handler for the SIGCHLD signal, which the parent receives whenever a child has died.

-
-
- - - - - -
- - -
-

In most cases, under normal system operation zombies are immediately waited on by their parent and then reaped by the system – processes that stay zombies for a long time are generally an error and cause a resource leak, but the only resource they occupy is the process table entry – process ID.

-
-
-
-
It is not possible to kill such a process with the kill command, because it is already considered dead.
-You can kill the parent process and then the zombie disappears as well.
-
-Zombies can be identified in the output from the Unix ps command by the presence of a "Z" in the "STAT" column
-
-
-
-
-
-
-

1.3. wait

-
-
-
The child process will not be completely removed until the parent process knows of the termination of its child process by the wait() system call.
-
-
-
-

A process (or task) may wait on another process to complete its execution.

-
-
-

The parent process issue a wait system call, which suspends the execution of the parent process while the child executes.

-
-
-

When the child process terminates, it returns an exit status to the operating system, which is then returned to the waiting parent process.

-
-
-

The parent process then resumes execution.

-
-
-
-

1.4. Orphan process

-
-

A child process whose parent process terminates before it does becomes an orphan process.

-
-
-

Such situations are typically handled with a special "root" (or "init") process, which is assigned as the new parent of a process when its parent process exits.

-
-
-

This special process detects when an orphan process terminates and then retrieves its exit status, allowing the system to deallocate the terminated child process.

-
-
-
-

1.5. Process States

-
-
-
ps aux
-
-
-
-

In the STAT column, you’ll see:

-
-
-
    -
  • -

    R: running or runnable, it is just waiting for the CPU to process it

    -
  • -
  • -

    S: Interruptible sleep, waiting for an event to complete, such as input from the terminal

    -
  • -
  • -

    D: Uninterruptible sleep, processes that cannot be killed or interrupted with a signal, usually to make them go away you have to reboot or fix the issue

    -
  • -
  • -

    Z: Zombie, we discussed in a previous lesson that zombies are terminated processes that are waiting to have their statuses collected

    -
  • -
  • -

    T: Stopped, a process that has been suspended/stopped

    -
  • -
-
-
-
-
-
-

2. Thread

-
-
-
-
A thread is an execution unit that has its own program counter, a stack and a set of registers that reside in a process
-
-
-
-

Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources.

-
-
-

The threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variables at any given time.

-
-
-
- -
-

Threads in the same process share:

-
-
-
    -
  • -

    Process instructions

    -
  • -
  • -

    open files, data

    -
  • -
  • -

    signals and signal handlers

    -
  • -
  • -

    current working directory

    -
  • -
  • -

    User and group id

    -
  • -
-
-
-
-
- - - - - -
- - -A thread is also called Light Weight Process (LWP). -
-
-
-

2.1. Implementations

-
-
    -
  • -

    LinuxThreads

    -
    -
      -
    • -

      The default thread implementation since Linux kernel 2.0 (introduced in 1996)

      -
    • -
    -
    -
  • -
  • -

    Native POSIX Thread Library (NPTL)

    -
    -
      -
    • -

      NPTL has been part of Red Hat Enterprise Linux since version 3, and in the Linux kernel since version 2.6. It is now a fully integrated part of the GNU C Library.

      -
    • -
    -
    -
  • -
  • -

    Next Generation POSIX Thread (NGPT)

    -
    -
      -
    • -

      A IBM developed version of POSIX thread library. The NGPT team collaborated closely with the NPTL team and combined the best features of both implementations into NPTL.

      -
    • -
    -
    -
  • -
-
-
-
-

2.2. Threads vs. processes pros and cons

-
-
    -
  • -

    processes are typically independent, while threads exist as subsets of a process

    -
  • -
  • -

    processes carry considerably more state information than threads, whereas multiple threads within a process share process state as well as memory and other resources

    -
  • -
  • -

    processes have separate address spaces, whereas threads share their address space

    -
  • -
  • -

    processes interact only through system-provided inter-process communication mechanisms

    -
  • -
  • -

    context switching between threads in the same process typically occurs faster than context switching between processes

    -
  • -
-
-
-

Advantages and disadvantages of threads vs processes include:

-
-
-
    -
  • -

    Lower resource consumption of threads: using threads, an application can operate using fewer resources than it would need when using multiple processes.

    -
  • -
  • -

    Simplified sharing and communication of threads: unlike processes, which require a message passing or shared memory mechanism to perform inter-process communication (IPC), threads can communicate through data, code and files they already share.

    -
  • -
-
-
- - - - - -
- - -Thread crashes a process: due to threads sharing the same address space, an illegal operation performed by a thread can crash the entire process; therefore, one misbehaving thread can disrupt the processing of all the other threads in the application. -
-
-
-

2.2.1. When should you prefer fork() over threading and vice-verse?

-
-

When you’re doing a far more complex task than just instantiating a worker, or you want the implicit security sandboxing of separate processes.

-
-
-
-

2.2.2. If I want to call an external application as a child, then should I use fork() or threads to do it?

-
-

If the child will do an identical task to the parent, with identical code, use fork. For smaller subtasks use threads.

-
-
-
-

2.2.3. it is bad thing to call a fork() inside a thread?

-
-

it’s computationally rather expensive to duplicate a process and a lot of subthreads.

-
-
-
-
-
-
-

3. Process Memory

-
-
-
-
A process uses its own memory area to perform work.
-
-
-
-
- -
-
    -
  • -

    Text Segment.

    -
    -
      -
    • -

      The Text segment (a.k.a the Instruction segment) contains the executable program code and constant data.

      -
    • -
    -
    -
  • -
  • -

    Data Segment

    -
    -
      -
    • -

      Heap

      -
      -
        -
      • -

        Heap is the segment from which the memory is provided. (e.g. malloc())

        -
      • -
      -
      -
    • -
    • -

      BSS:

      -
      -
        -
      • -

        The area where zero-initialized data is stored. All the global variable which are not initialized in the program are stored in the BSS segment.

        -
      • -
      -
      -
    • -
    • -

      Data:

      -
      -
        -
      • -

        The area where initialized data are stored.

        -
      • -
      -
      -
    • -
    -
    -
  • -
  • -

    Stack Segment

    -
    -
      -
    • -

      The stack segment is used by the process for the storage of automatic identifier, register variables, and function call information.

      -
    • -
    -
    -
  • -
-
-
-
-
-
what process is attached to a shared memory segment?
-
-
You can use:
-ipcs -mp to get the process ID
-and
-with the command grep [shared memory segment] /proc/*/maps
-
-
-
- - - - - -
- - -ipcs shows information on the inter-process communication facilities for which the calling process has read access. -By default it shows information about all three resources: shared memory segments, message queues, and semaphore arrays. -
-
-
-
-
-

4. Process priority (nice)

-
-
-

In Linux we can set guidelines for the CPU to follow when it is looking at all the tasks it has to do. -These guidelines are called niceness or nice value.

-
-
-

The "niceness" scale goes from

-
-
-
    -
  • -

    -20 (highest priority value)

    -
  • -
  • -

    19 (lowest priority value)

    -
  • -
  • -

    default is 0

    -
  • -
-
-
-

The nice priority is actually used for user programs.

-
-
- - - - - -
- - -Priority is all about managing processor time -
-
-
-
-
nice  run a program with modified scheduling priority
-chrt  allows to set your scheduling policy as well as priority.
-
-
-
-
-
-

5. Scheduler

-
-
-
- -
-
-
The scheduler is the Linux kernel part that decides which runnable process will be executed by the CPU next.
-
-
-
-

It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

-
-
-
-
- - - - - -
- - -
-

The scheduler makes it possible to execute multiple programs at the same time, thus sharing the CPU with users of varying needs.

-
-
-
    -
  • -

    Minimizing response time

    -
  • -
  • -

    Maximizing overall CPU utilization

    -
  • -
-
-
-
-
- - - - - -
- - -Since Linux 2.6.23, the default scheduler is CFS, the "Completely Fair Scheduler". The - CFS scheduler replaced the earlier "O(1)" scheduler. [5] [6] -
-
-
-
-
-

6. Context switching

-
-
-

Context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point. -This allows multiple processes to share a single central processing unit (CPU), and is an essential feature of a multitasking operating system.

-
-
-

In the Linux kernel, context switching involves

-
-
-
    -
  • -

    switching registers

    -
  • -
  • -

    stack pointer

    -
  • -
  • -

    program counter

    -
  • -
  • -

    flushing the translation lookaside buffer (TLB)

    -
  • -
  • -

    and loading the page table of the next process to run (unless the old process shares the memory with the new).

    -
  • -
-
-
-
-
-

7. Interrupts

-
-
-

An interrupt is an event that alters the normal execution flow of a program and can be generated by hardware devices or even by the CPU itself.

-
-
-

Interrupts can be grouped into two categories based on the source of the interrupt:

-
-
-
    -
  • -

    synchronous, generated by executing an instruction

    -
  • -
  • -

    asynchronous, generated by an external event

    -
    -
      -
    • -

      For example a network card generates an interrupts to signal that a packet has arrived.

      -
    • -
    -
    -
  • -
-
-
-
-
Information related to hard interrupts at /proc/interrupts
-
-
-
-
-
-
-
-
-1. http://www.it.uu.se/education/course/homepage/os/vt18/images/module-2/fork-exec-exit-wait.png -
-
-2. https://commons.wikimedia.org/w/index.php?curid=2233446 -
-
-3. https://gabrieletolomei.files.wordpress.com/2013/10/program_in_memory2.png?w=960 -
-
-4. By ScotXW - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=47075153 -
-
-5. https://en.wikipedia.org/wiki/Completely_Fair_Scheduler -
-
-6. https://www.kernel.org/doc/html/latest/scheduler/index.html -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/a1pe6qafxin.html b/src-local/LabLearningObject-hybrid-tmp/a1pe6qafxin.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/a1pe6qafxin.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/a2l6ys.html b/src-local/LabLearningObject-hybrid-tmp/a2l6ys.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/a2l6ys.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/aev9j56uytn.html b/src-local/LabLearningObject-hybrid-tmp/aev9j56uytn.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/aev9j56uytn.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/aixf26djuxt.html b/src-local/LabLearningObject-hybrid-tmp/aixf26djuxt.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/aixf26djuxt.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/an1dho.html b/src-local/LabLearningObject-hybrid-tmp/an1dho.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/an1dho.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/asxh7xuhpqr.html b/src-local/LabLearningObject-hybrid-tmp/asxh7xuhpqr.html deleted file mode 100644 index 212dfea..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/asxh7xuhpqr.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Managing software

-
-
-

1.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

1.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

1.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

1.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

1.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

1.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

1.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/axcyus99gy.html b/src-local/LabLearningObject-hybrid-tmp/axcyus99gy.html deleted file mode 100644 index 8aa4b10..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/axcyus99gy.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
procfs
-
-

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, -providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

-
-
-

Typically

-
-
-
    -
  • -

    it is mapped to a mount point named /proc at boot time.

    -
  • -
  • -

    The proc file system acts as an interface to internal data structures in the kernel.

    -
  • -
  • -

    It can be used to obtain information about the system and to change certain kernel parameters at runtime (sysctl).

    -
  • -
-
-
-
-
-
-
-

1. The /proc Filesystem

-
-
- - - - - -
- - -The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls. -
-
-
-

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

-
-
-

The link ‘self’ points to the process reading the file system. Each process subdirectory has the entries listed in: ls /proc/<pid>

-
-
-
-
cat /proc/meminfo
-
-
-MemTotal:        8174328 kB
-MemFree:         6186516 kB
-MemAvailable:    7535332 kB
-Buffers:          146740 kB
-Cached:          1294156 kB
-SwapCached:            0 kB
-Active:           967184 kB
-Inactive:         606252 kB
-Active(anon):     135620 kB
-Inactive(anon):    85064 kB
-Active(file):     831564 kB
-Inactive(file):   521188 kB
-Unevictable:        3652 kB
-Mlocked:            3652 kB
-SwapTotal:             0 kB
-SwapFree:              0 kB
-Dirty:                68 kB
-Writeback:             0 kB
-AnonPages:        136188 kB
-Mapped:           113344 kB
-Shmem:             85724 kB
-Slab:             340236 kB
-SReclaimable:     302048 kB
-SUnreclaim:        38188 kB
-KernelStack:        3792 kB
-PageTables:         4888 kB
-NFS_Unstable:          0 kB
-Bounce:                0 kB
-WritebackTmp:          0 kB
-CommitLimit:     4087164 kB
-Committed_AS:     901432 kB
-VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB
-VmallocChunk:          0 kB
-HardwareCorrupted:     0 kB
-AnonHugePages:     51200 kB
-CmaTotal:              0 kB
-CmaFree:               0 kB
-
-...
-
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Main entries in /proc
FileContent

/proc/cmdline

– Kernel command line information.

/proc/console

– Information about current consoles including tty.

/proc/crypto

- a list of available cryptographic modules

/proc/devices

– Device drivers currently configured for the running kernel.

/proc/diskstats

- giving some information (including device numbers) for each of the logical disk devices

/proc/dma

– Info about current DMA channels.

/proc/fb

– Framebuffer devices.

/proc/filesystems

– Current filesystems supported by the kernel.

/proc/interrupts, /proc/iomem, /proc/ioports and the directory /proc/irq

- giving some self-explanatory details about the devices (physical or logical) using the various system resources

/proc/iomem

– Current system memory map for devices.

/proc/ioports

– Registered port regions for input output communication with device.

/proc/loadavg

– System load average.

/proc/locks

– Files currently locked by kernel.

/proc/meminfo

– Info about system memory (see above example).

/proc/misc

– Miscellaneous drivers registered for miscellaneous major device.

/proc/modules

- one of the most important files in /proc, containing a list of the kernel modules currently loaded . It gives some indication (not always entirely correct) of dependencies.

/proc/mounts

– List of all mounts in use by system.

/proc/mounts

- a symlink to self/mounts which contains a list of the currently mounted devices and their mount points (and which file system is in use and what mount options are in use).

/proc/net

- a directory containing useful information about the network stack, in particular /proc/net/nf_conntrack, which lists existing network connections (particularly useful for tracking routing when iptables FORWARD is used to redirect network connections)

/proc/partitions

– Detailed info about partitions available to the system.

/proc/pci

– Information about every PCI device.

/proc/stat

– Record or various statistics kept from last reboot.

/proc/swap

– Information about swap space.

/proc/scsi

- giving information about any devices connected via a SCSI or RAID controller

/proc/sysvipc

- containing memory-sharing and inter-process communication (IPC) information.

/proc/tty

- containing information about the current terminals; /proc/tty/driver looks to be[original research?] a list of the different types of tty available - each of which is a list of those of each type

/proc/uptime

– Uptime information (in seconds).

/proc/version

– Kernel version, gcc version, and Linux distribution installed.

-
-
-
-

2. cpu info

-
-
-
-
cat /proc/cpuinfo
-
-processor	: 0
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 2000.000
- cache size	: 1024 KB
- ...
- processor	: 1
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 800.000
- cache size	: 1024 KB
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/azh9w6ys9jn.html b/src-local/LabLearningObject-hybrid-tmp/azh9w6ys9jn.html deleted file mode 100644 index 212dfea..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/azh9w6ys9jn.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Managing software

-
-
-

1.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

1.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

1.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

1.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

1.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

1.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

1.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/b1500q27hm.html b/src-local/LabLearningObject-hybrid-tmp/b1500q27hm.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/b1500q27hm.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/b2r8fhdtzun.html b/src-local/LabLearningObject-hybrid-tmp/b2r8fhdtzun.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/b2r8fhdtzun.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/b9rbn.html b/src-local/LabLearningObject-hybrid-tmp/b9rbn.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/b9rbn.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/bbb8sb8gnb4.html b/src-local/LabLearningObject-hybrid-tmp/bbb8sb8gnb4.html deleted file mode 100644 index fa85fef..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/bbb8sb8gnb4.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Find and grep

-
-
-

1.1. find

-
-

The find tool, known from UNIX, is very powerful. This command not only allows you to search file names, it can also accept file size, date of last change and other file properties as criteria for a search.

-
-
-

The most common use is for finding file names:

-
-
- - - - - -
- - -find <path> -name <searchstring> -
-
-
-

This can be interpreted as "Look in all files and subdirectories contained in a given path, and print the names of the files containing the search string in their name" (not in their content).

-
-
-
-
 find /etc -name "*.conf"
-
-
-
-
-

1.2. grep

-
-

grep is used for filtering input lines and returning certain patterns to the output.

-
-
- - - - - -
- - -grep "string" path/to/file -
-
-
-
-
 grep "root" /etc/passwd
-
-
-
-
-

1.3. find and grep command together

-
-

find /etc -name "*.conf" -exec grep -Hns "conf" {} \;

-
-
-
Explanation
-
-
-H, --with-filename
-      Print the filename for each match
--n, --line-number
-      Prefix each line of output with the 1-based line number within its input file
--s, --no-messages
-      Suppress error messages about nonexistent or unreadable files.
-
-
-
- - - - - -
- - -This can be interpreted as
-- "Look for *.conf files and subdirectories contained in /etc, and if true exec grep -Hns conf in the given file" -
-
-
- - - - - -
- - -Very powerful in bash scripts -create a file test.sh -
-
-
-
bash script
-
-
#!/bin/bash
-STRING=$(find /etc -name "*.conf" -exec grep -Hns "conf" {} \;)
-echo $STRING
-
-
-
-

exec it

-
-
-
bash script
-
-
chmod 700 test.sh
-./test.sh
-
-
-
-


-
-

-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/bbrbcb4x489.html b/src-local/LabLearningObject-hybrid-tmp/bbrbcb4x489.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/bbrbcb4x489.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/bhcyj5rlxb8.html b/src-local/LabLearningObject-hybrid-tmp/bhcyj5rlxb8.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/bhcyj5rlxb8.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/bjined0gi8n.html b/src-local/LabLearningObject-hybrid-tmp/bjined0gi8n.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/bjined0gi8n.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/bnaki4o9rs.html b/src-local/LabLearningObject-hybrid-tmp/bnaki4o9rs.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/bnaki4o9rs.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/buum6jtk4lf.html b/src-local/LabLearningObject-hybrid-tmp/buum6jtk4lf.html deleted file mode 100644 index f2775b3..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/buum6jtk4lf.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Exercise answer

-
- -
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/bwmp2.html b/src-local/LabLearningObject-hybrid-tmp/bwmp2.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/bwmp2.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/bxc14yyqa4p.html b/src-local/LabLearningObject-hybrid-tmp/bxc14yyqa4p.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/bxc14yyqa4p.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/bz4dsqp7eo5.html b/src-local/LabLearningObject-hybrid-tmp/bz4dsqp7eo5.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/bz4dsqp7eo5.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/c28zy8bemxd.html b/src-local/LabLearningObject-hybrid-tmp/c28zy8bemxd.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/c28zy8bemxd.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/c3tmezpvv6d.html b/src-local/LabLearningObject-hybrid-tmp/c3tmezpvv6d.html deleted file mode 100644 index 9140409..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/c3tmezpvv6d.html +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-
-
-
-
Life cycle of a process
-
-
- -
-

fork() is the the system call that the parent process uses to "divide" itself ("fork") into two identical processes.

-
-
-
    -
  • -

    After calling fork(), the created child process is an exact copy of the parent except for the return value of the fork() call.

    -
    -
      -
    • -

      This includes open files, register state, and all memory allocations, which includes the program’s executable code. In some cases the two continue to run the same binary,

      -
    • -
    -
    -
  • -
  • -

    the child switches to running another binary executable using the exec() system call.

    -
  • -
-
-
-
-
-
-
-
-
-

1. Life cycle of a process

-
-
-
    -
  • -

    When a process forks, a complete copy of the executing program is made into the new process.

    -
    -
      -
    • -

      This new process is a child of the parent process, and has a new process identifier (PID).

      -
    • -
    -
    -
  • -
  • -

    The fork() function returns the child’s PID to the parent process.

    -
    -
      -
    • -

      The fork() function returns 0 to the child process.

      -
    • -
    • -

      This enables the two identical processes to distinguish one another.

      -
    • -
    -
    -
  • -
  • -

    The parent process can either continue execution or wait for the child process to complete.

    -
  • -
  • -

    The child, after discovering that it is the child, replaces itself completely with another program, so that the code and address space of the original program are lost.

    -
  • -
  • -

    If the parent chooses to wait for the child to die, then the parent will receive the exit code of the program that the child executed.

    -
  • -
  • -

    To prevent the child becoming a zombie the parent should call wait on its children, either periodically or upon receiving the SIGCHLD signal, which indicates a child process has terminated.

    -
  • -
  • -

    One can also asynchronously wait on their children to finish, by using a signal handler for SIGCHLD, if they need to ensure everything is cleaned up.

    -
  • -
-
-
- - - - - -
- - -
-
    -
  • -

    When the child process calls exec(), all data in the original program is lost, and it is replaced with a running copy of the new program.

    -
    -
      -
    • -

      This is known as overlaying.

      -
    • -
    -
    -
  • -
  • -

    Although all data are replaced, the file descriptors that were open in the parent are closed only if the program has explicitly marked them close-on-exec.

    -
  • -
  • -

    This allows for the common practice of the parent creating a pipe prior to calling fork() and using it to communicate with the executed program.

    -
  • -
-
-
-
-
-

1.1. copy-on-write

-
-
-
All processes are sharing the same set of pages and each one gets its own private copy when it wants to modify a page.
-
-
-
-

In such cases, a technique called copy-on-write (COW) is used.

-
-
-

With this technique, when a fork occurs, the parent process’s pages are not copied for the child process.

-
-
-

Instead, the pages are shared between the child and the parent process.

-
-
-

Whenever a process (parent or child) modifies a page, a separate copy of that particular page alone is made for that process (parent or child) which performed the modification.

-
-
-

This process will then use the newly copied page rather than the shared one in all future references. -The other process (the one which did not modify the shared page) continues to use the original copy of the page (which is now no longer shared). This technique is called copy-on-write since the page is copied when some process writes to it.

-
-
- - - - - -
- - -
-

copy-on-write is lazy copying, child process copy the page when try to write it.

-
-
-

So basically, after a fork, almost child’s memory is shared with parent.

-
-
-

Before any of the processes made, every child process still have some private memory, modified from parent’s or new allocating.

-
-
-

That means even without any action the forked child process has some private memory.

-
-
-

We can verify it with

-
-
-
-
cat /proc/PID/smaps
-or
-pmap  PID
-
-
-
-
-
- - - - - -
- - -
-

This operation avoids unnecessary overhead because copying an entire address space is a very slow and inefficient operation which uses a lot of processor time and resources.

-
-
-
-
-
-

1.2. Zombie processes

-
-
-
A child process always first becomes a zombie before being removed from the resource table.
-
-
-
-

When a process ends via exit, all of the memory and resources associated with it are deallocated so they can be used by other processes.

-
-
-

The process’s entry in the process table remains.

-
-
-

The parent can read the child’s exit status by executing the wait system call, whereupon the zombie is removed.

-
-
-

The wait call may be executed in sequential code, but it is commonly executed in a handler for the SIGCHLD signal, which the parent receives whenever a child has died.

-
-
- - - - - -
- - -
-

In most cases, under normal system operation zombies are immediately waited on by their parent and then reaped by the system – processes that stay zombies for a long time are generally an error and cause a resource leak, but the only resource they occupy is the process table entry – process ID.

-
-
-
-
It is not possible to kill such a process with the kill command, because it is already considered dead.
-You can kill the parent process and then the zombie disappears as well.
-
-Zombies can be identified in the output from the Unix ps command by the presence of a "Z" in the "STAT" column
-
-
-
-
-
-
-

1.3. wait

-
-
-
The child process will not be completely removed until the parent process knows of the termination of its child process by the wait() system call.
-
-
-
-

A process (or task) may wait on another process to complete its execution.

-
-
-

The parent process issue a wait system call, which suspends the execution of the parent process while the child executes.

-
-
-

When the child process terminates, it returns an exit status to the operating system, which is then returned to the waiting parent process.

-
-
-

The parent process then resumes execution.

-
-
-
-

1.4. Orphan process

-
-

A child process whose parent process terminates before it does becomes an orphan process.

-
-
-

Such situations are typically handled with a special "root" (or "init") process, which is assigned as the new parent of a process when its parent process exits.

-
-
-

This special process detects when an orphan process terminates and then retrieves its exit status, allowing the system to deallocate the terminated child process.

-
-
-
-

1.5. Process States

-
-
-
ps aux
-
-
-
-

In the STAT column, you’ll see:

-
-
-
    -
  • -

    R: running or runnable, it is just waiting for the CPU to process it

    -
  • -
  • -

    S: Interruptible sleep, waiting for an event to complete, such as input from the terminal

    -
  • -
  • -

    D: Uninterruptible sleep, processes that cannot be killed or interrupted with a signal, usually to make them go away you have to reboot or fix the issue

    -
  • -
  • -

    Z: Zombie, we discussed in a previous lesson that zombies are terminated processes that are waiting to have their statuses collected

    -
  • -
  • -

    T: Stopped, a process that has been suspended/stopped

    -
  • -
-
-
-
-
-
-

2. Thread

-
-
-
-
A thread is an execution unit that has its own program counter, a stack and a set of registers that reside in a process
-
-
-
-

Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources.

-
-
-

The threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variables at any given time.

-
-
-
- -
-

Threads in the same process share:

-
-
-
    -
  • -

    Process instructions

    -
  • -
  • -

    open files, data

    -
  • -
  • -

    signals and signal handlers

    -
  • -
  • -

    current working directory

    -
  • -
  • -

    User and group id

    -
  • -
-
-
-
-
- - - - - -
- - -A thread is also called Light Weight Process (LWP). -
-
-
-

2.1. Implementations

-
-
    -
  • -

    LinuxThreads

    -
    -
      -
    • -

      The default thread implementation since Linux kernel 2.0 (introduced in 1996)

      -
    • -
    -
    -
  • -
  • -

    Native POSIX Thread Library (NPTL)

    -
    -
      -
    • -

      NPTL has been part of Red Hat Enterprise Linux since version 3, and in the Linux kernel since version 2.6. It is now a fully integrated part of the GNU C Library.

      -
    • -
    -
    -
  • -
  • -

    Next Generation POSIX Thread (NGPT)

    -
    -
      -
    • -

      A IBM developed version of POSIX thread library. The NGPT team collaborated closely with the NPTL team and combined the best features of both implementations into NPTL.

      -
    • -
    -
    -
  • -
-
-
-
-

2.2. Threads vs. processes pros and cons

-
-
    -
  • -

    processes are typically independent, while threads exist as subsets of a process

    -
  • -
  • -

    processes carry considerably more state information than threads, whereas multiple threads within a process share process state as well as memory and other resources

    -
  • -
  • -

    processes have separate address spaces, whereas threads share their address space

    -
  • -
  • -

    processes interact only through system-provided inter-process communication mechanisms

    -
  • -
  • -

    context switching between threads in the same process typically occurs faster than context switching between processes

    -
  • -
-
-
-

Advantages and disadvantages of threads vs processes include:

-
-
-
    -
  • -

    Lower resource consumption of threads: using threads, an application can operate using fewer resources than it would need when using multiple processes.

    -
  • -
  • -

    Simplified sharing and communication of threads: unlike processes, which require a message passing or shared memory mechanism to perform inter-process communication (IPC), threads can communicate through data, code and files they already share.

    -
  • -
-
-
- - - - - -
- - -Thread crashes a process: due to threads sharing the same address space, an illegal operation performed by a thread can crash the entire process; therefore, one misbehaving thread can disrupt the processing of all the other threads in the application. -
-
-
-

2.2.1. When should you prefer fork() over threading and vice-verse?

-
-

When you’re doing a far more complex task than just instantiating a worker, or you want the implicit security sandboxing of separate processes.

-
-
-
-

2.2.2. If I want to call an external application as a child, then should I use fork() or threads to do it?

-
-

If the child will do an identical task to the parent, with identical code, use fork. For smaller subtasks use threads.

-
-
-
-

2.2.3. it is bad thing to call a fork() inside a thread?

-
-

it’s computationally rather expensive to duplicate a process and a lot of subthreads.

-
-
-
-
-
-
-

3. Process Memory

-
-
-
-
A process uses its own memory area to perform work.
-
-
-
-
- -
-
    -
  • -

    Text Segment.

    -
    -
      -
    • -

      The Text segment (a.k.a the Instruction segment) contains the executable program code and constant data.

      -
    • -
    -
    -
  • -
  • -

    Data Segment

    -
    -
      -
    • -

      Heap

      -
      -
        -
      • -

        Heap is the segment from which the memory is provided. (e.g. malloc())

        -
      • -
      -
      -
    • -
    • -

      BSS:

      -
      -
        -
      • -

        The area where zero-initialized data is stored. All the global variable which are not initialized in the program are stored in the BSS segment.

        -
      • -
      -
      -
    • -
    • -

      Data:

      -
      -
        -
      • -

        The area where initialized data are stored.

        -
      • -
      -
      -
    • -
    -
    -
  • -
  • -

    Stack Segment

    -
    -
      -
    • -

      The stack segment is used by the process for the storage of automatic identifier, register variables, and function call information.

      -
    • -
    -
    -
  • -
-
-
-
-
-
what process is attached to a shared memory segment?
-
-
You can use:
-ipcs -mp to get the process ID
-and
-with the command grep [shared memory segment] /proc/*/maps
-
-
-
- - - - - -
- - -ipcs shows information on the inter-process communication facilities for which the calling process has read access. -By default it shows information about all three resources: shared memory segments, message queues, and semaphore arrays. -
-
-
-
-
-

4. Process priority (nice)

-
-
-

In Linux we can set guidelines for the CPU to follow when it is looking at all the tasks it has to do. -These guidelines are called niceness or nice value.

-
-
-

The "niceness" scale goes from

-
-
-
    -
  • -

    -20 (highest priority value)

    -
  • -
  • -

    19 (lowest priority value)

    -
  • -
  • -

    default is 0

    -
  • -
-
-
-

The nice priority is actually used for user programs.

-
-
- - - - - -
- - -Priority is all about managing processor time -
-
-
-
-
nice  run a program with modified scheduling priority
-chrt  allows to set your scheduling policy as well as priority.
-
-
-
-
-
-

5. Scheduler

-
-
-
- -
-
-
The scheduler is the Linux kernel part that decides which runnable process will be executed by the CPU next.
-
-
-
-

It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

-
-
-
-
- - - - - -
- - -
-

The scheduler makes it possible to execute multiple programs at the same time, thus sharing the CPU with users of varying needs.

-
-
-
    -
  • -

    Minimizing response time

    -
  • -
  • -

    Maximizing overall CPU utilization

    -
  • -
-
-
-
-
- - - - - -
- - -Since Linux 2.6.23, the default scheduler is CFS, the "Completely Fair Scheduler". The - CFS scheduler replaced the earlier "O(1)" scheduler. [5] [6] -
-
-
-
-
-

6. Context switching

-
-
-

Context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point. -This allows multiple processes to share a single central processing unit (CPU), and is an essential feature of a multitasking operating system.

-
-
-

In the Linux kernel, context switching involves

-
-
-
    -
  • -

    switching registers

    -
  • -
  • -

    stack pointer

    -
  • -
  • -

    program counter

    -
  • -
  • -

    flushing the translation lookaside buffer (TLB)

    -
  • -
  • -

    and loading the page table of the next process to run (unless the old process shares the memory with the new).

    -
  • -
-
-
-
-
-

7. Interrupts

-
-
-

An interrupt is an event that alters the normal execution flow of a program and can be generated by hardware devices or even by the CPU itself.

-
-
-

Interrupts can be grouped into two categories based on the source of the interrupt:

-
-
-
    -
  • -

    synchronous, generated by executing an instruction

    -
  • -
  • -

    asynchronous, generated by an external event

    -
    -
      -
    • -

      For example a network card generates an interrupts to signal that a packet has arrived.

      -
    • -
    -
    -
  • -
-
-
-
-
Information related to hard interrupts at /proc/interrupts
-
-
-
-
-
-
-
-
-1. http://www.it.uu.se/education/course/homepage/os/vt18/images/module-2/fork-exec-exit-wait.png -
-
-2. https://commons.wikimedia.org/w/index.php?curid=2233446 -
-
-3. https://gabrieletolomei.files.wordpress.com/2013/10/program_in_memory2.png?w=960 -
-
-4. By ScotXW - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=47075153 -
-
-5. https://en.wikipedia.org/wiki/Completely_Fair_Scheduler -
-
-6. https://www.kernel.org/doc/html/latest/scheduler/index.html -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/c80kmq.html b/src-local/LabLearningObject-hybrid-tmp/c80kmq.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/c80kmq.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/c9g3860bb2v.html b/src-local/LabLearningObject-hybrid-tmp/c9g3860bb2v.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/c9g3860bb2v.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ca447s.html b/src-local/LabLearningObject-hybrid-tmp/ca447s.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ca447s.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ccdyjhwixp.html b/src-local/LabLearningObject-hybrid-tmp/ccdyjhwixp.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ccdyjhwixp.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ce22he.html b/src-local/LabLearningObject-hybrid-tmp/ce22he.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ce22he.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/cezsd2kfd2d.html b/src-local/LabLearningObject-hybrid-tmp/cezsd2kfd2d.html deleted file mode 100644 index 9c97878..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/cezsd2kfd2d.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/coqfzs7rkm9.html b/src-local/LabLearningObject-hybrid-tmp/coqfzs7rkm9.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/coqfzs7rkm9.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ctnlpr63i95.html b/src-local/LabLearningObject-hybrid-tmp/ctnlpr63i95.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ctnlpr63i95.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/d0otdrxner.html b/src-local/LabLearningObject-hybrid-tmp/d0otdrxner.html deleted file mode 100644 index b0ca4f3..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/d0otdrxner.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/d3z5tys5xxm.html b/src-local/LabLearningObject-hybrid-tmp/d3z5tys5xxm.html deleted file mode 100644 index a5dae75..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/d3z5tys5xxm.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/d67fjrn3bx.html b/src-local/LabLearningObject-hybrid-tmp/d67fjrn3bx.html deleted file mode 100644 index dff2c6a..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/d67fjrn3bx.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/d6ulqy.html b/src-local/LabLearningObject-hybrid-tmp/d6ulqy.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/d6ulqy.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/d7rtn1tv9vs.html b/src-local/LabLearningObject-hybrid-tmp/d7rtn1tv9vs.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/d7rtn1tv9vs.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/db7saktwcyu.html b/src-local/LabLearningObject-hybrid-tmp/db7saktwcyu.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/db7saktwcyu.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/dbmkimnsntc.html b/src-local/LabLearningObject-hybrid-tmp/dbmkimnsntc.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/dbmkimnsntc.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/dcjtuo.html b/src-local/LabLearningObject-hybrid-tmp/dcjtuo.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/dcjtuo.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ded0jk4zkri.html b/src-local/LabLearningObject-hybrid-tmp/ded0jk4zkri.html deleted file mode 100644 index 212dfea..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ded0jk4zkri.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Managing software

-
-
-

1.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

1.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

1.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

1.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

1.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

1.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

1.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/dhscge.html b/src-local/LabLearningObject-hybrid-tmp/dhscge.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/dhscge.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ds96dcjes6.html b/src-local/LabLearningObject-hybrid-tmp/ds96dcjes6.html deleted file mode 100644 index f2775b3..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ds96dcjes6.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Exercise answer

-
- -
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/dss3ig3mpjj.html b/src-local/LabLearningObject-hybrid-tmp/dss3ig3mpjj.html deleted file mode 100644 index c905b40..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/dss3ig3mpjj.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Find and grep

-
-
-

1.1. find

-
-

The find tool, known from UNIX, is very powerful. This command not only allows you to search file names, it can also accept file size, date of last change and other file properties as criteria for a search.

-
-
-

The most common use is for finding file names:

-
-
- - - - - -
- - -find <path> -name <searchstring> -
-
-
-

This can be interpreted as "Look in all files and subdirectories contained in a given path, and print the names of the files containing the search string in their name" (not in their content).

-
-
-
-
 find /etc -name "*.conf"
-
-
-
-
-

1.2. grep

-
-

grep is used for filtering input lines and returning certain patterns to the output.

-
-
- - - - - -
- - -grep "string" path/to/file -
-
-
-
-
 grep "root" /etc/passwd
-
-
-
-
-

1.3. find and grep command together

-
-

find /etc -name "*.conf" -exec grep -Hns "conf" {} \;

-
-
-
Explanation
-
-
-H, --with-filename
-      Print the filename for each match
--n, --line-number
-      Prefix each line of output with the 1-based line number within its input file
--s, --no-messages
-      Suppress error messages about nonexistent or unreadable files.
-
-
-
- - - - - -
- - -This can be interpreted as
-- "Look for *.conf files and subdirectories contained in /etc, and if true exec grep -Hns conf in the given file" -
-
-
- - - - - -
- - -Very powerful in bash scripts -create a file test.sh -.bash script -
-
-
-
-
#!/bin/bash
-STRING=$(find /etc -name "*.conf" -exec grep -Hns "conf" {} \;)
-echo $STRING
-
-
-
-

exec it -.bash script

-
-
-
-
chmod 700 test.sh
-./test.sh
-
-
-
-


-
-

-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/dtniws.html b/src-local/LabLearningObject-hybrid-tmp/dtniws.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/dtniws.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/dtvjh.html b/src-local/LabLearningObject-hybrid-tmp/dtvjh.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/dtvjh.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/e0fnevbqns.html b/src-local/LabLearningObject-hybrid-tmp/e0fnevbqns.html deleted file mode 100644 index 8aa4b10..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/e0fnevbqns.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
procfs
-
-

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, -providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

-
-
-

Typically

-
-
-
    -
  • -

    it is mapped to a mount point named /proc at boot time.

    -
  • -
  • -

    The proc file system acts as an interface to internal data structures in the kernel.

    -
  • -
  • -

    It can be used to obtain information about the system and to change certain kernel parameters at runtime (sysctl).

    -
  • -
-
-
-
-
-
-
-

1. The /proc Filesystem

-
-
- - - - - -
- - -The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls. -
-
-
-

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

-
-
-

The link ‘self’ points to the process reading the file system. Each process subdirectory has the entries listed in: ls /proc/<pid>

-
-
-
-
cat /proc/meminfo
-
-
-MemTotal:        8174328 kB
-MemFree:         6186516 kB
-MemAvailable:    7535332 kB
-Buffers:          146740 kB
-Cached:          1294156 kB
-SwapCached:            0 kB
-Active:           967184 kB
-Inactive:         606252 kB
-Active(anon):     135620 kB
-Inactive(anon):    85064 kB
-Active(file):     831564 kB
-Inactive(file):   521188 kB
-Unevictable:        3652 kB
-Mlocked:            3652 kB
-SwapTotal:             0 kB
-SwapFree:              0 kB
-Dirty:                68 kB
-Writeback:             0 kB
-AnonPages:        136188 kB
-Mapped:           113344 kB
-Shmem:             85724 kB
-Slab:             340236 kB
-SReclaimable:     302048 kB
-SUnreclaim:        38188 kB
-KernelStack:        3792 kB
-PageTables:         4888 kB
-NFS_Unstable:          0 kB
-Bounce:                0 kB
-WritebackTmp:          0 kB
-CommitLimit:     4087164 kB
-Committed_AS:     901432 kB
-VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB
-VmallocChunk:          0 kB
-HardwareCorrupted:     0 kB
-AnonHugePages:     51200 kB
-CmaTotal:              0 kB
-CmaFree:               0 kB
-
-...
-
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Main entries in /proc
FileContent

/proc/cmdline

– Kernel command line information.

/proc/console

– Information about current consoles including tty.

/proc/crypto

- a list of available cryptographic modules

/proc/devices

– Device drivers currently configured for the running kernel.

/proc/diskstats

- giving some information (including device numbers) for each of the logical disk devices

/proc/dma

– Info about current DMA channels.

/proc/fb

– Framebuffer devices.

/proc/filesystems

– Current filesystems supported by the kernel.

/proc/interrupts, /proc/iomem, /proc/ioports and the directory /proc/irq

- giving some self-explanatory details about the devices (physical or logical) using the various system resources

/proc/iomem

– Current system memory map for devices.

/proc/ioports

– Registered port regions for input output communication with device.

/proc/loadavg

– System load average.

/proc/locks

– Files currently locked by kernel.

/proc/meminfo

– Info about system memory (see above example).

/proc/misc

– Miscellaneous drivers registered for miscellaneous major device.

/proc/modules

- one of the most important files in /proc, containing a list of the kernel modules currently loaded . It gives some indication (not always entirely correct) of dependencies.

/proc/mounts

– List of all mounts in use by system.

/proc/mounts

- a symlink to self/mounts which contains a list of the currently mounted devices and their mount points (and which file system is in use and what mount options are in use).

/proc/net

- a directory containing useful information about the network stack, in particular /proc/net/nf_conntrack, which lists existing network connections (particularly useful for tracking routing when iptables FORWARD is used to redirect network connections)

/proc/partitions

– Detailed info about partitions available to the system.

/proc/pci

– Information about every PCI device.

/proc/stat

– Record or various statistics kept from last reboot.

/proc/swap

– Information about swap space.

/proc/scsi

- giving information about any devices connected via a SCSI or RAID controller

/proc/sysvipc

- containing memory-sharing and inter-process communication (IPC) information.

/proc/tty

- containing information about the current terminals; /proc/tty/driver looks to be[original research?] a list of the different types of tty available - each of which is a list of those of each type

/proc/uptime

– Uptime information (in seconds).

/proc/version

– Kernel version, gcc version, and Linux distribution installed.

-
-
-
-

2. cpu info

-
-
-
-
cat /proc/cpuinfo
-
-processor	: 0
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 2000.000
- cache size	: 1024 KB
- ...
- processor	: 1
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 800.000
- cache size	: 1024 KB
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ea78da7efci.html b/src-local/LabLearningObject-hybrid-tmp/ea78da7efci.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ea78da7efci.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ei0i06um1zu.html b/src-local/LabLearningObject-hybrid-tmp/ei0i06um1zu.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ei0i06um1zu.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/eix9yu0eg5a.html b/src-local/LabLearningObject-hybrid-tmp/eix9yu0eg5a.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/eix9yu0eg5a.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/eknizlly6e.html b/src-local/LabLearningObject-hybrid-tmp/eknizlly6e.html deleted file mode 100644 index 8aa4b10..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/eknizlly6e.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
procfs
-
-

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, -providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

-
-
-

Typically

-
-
-
    -
  • -

    it is mapped to a mount point named /proc at boot time.

    -
  • -
  • -

    The proc file system acts as an interface to internal data structures in the kernel.

    -
  • -
  • -

    It can be used to obtain information about the system and to change certain kernel parameters at runtime (sysctl).

    -
  • -
-
-
-
-
-
-
-

1. The /proc Filesystem

-
-
- - - - - -
- - -The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls. -
-
-
-

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

-
-
-

The link ‘self’ points to the process reading the file system. Each process subdirectory has the entries listed in: ls /proc/<pid>

-
-
-
-
cat /proc/meminfo
-
-
-MemTotal:        8174328 kB
-MemFree:         6186516 kB
-MemAvailable:    7535332 kB
-Buffers:          146740 kB
-Cached:          1294156 kB
-SwapCached:            0 kB
-Active:           967184 kB
-Inactive:         606252 kB
-Active(anon):     135620 kB
-Inactive(anon):    85064 kB
-Active(file):     831564 kB
-Inactive(file):   521188 kB
-Unevictable:        3652 kB
-Mlocked:            3652 kB
-SwapTotal:             0 kB
-SwapFree:              0 kB
-Dirty:                68 kB
-Writeback:             0 kB
-AnonPages:        136188 kB
-Mapped:           113344 kB
-Shmem:             85724 kB
-Slab:             340236 kB
-SReclaimable:     302048 kB
-SUnreclaim:        38188 kB
-KernelStack:        3792 kB
-PageTables:         4888 kB
-NFS_Unstable:          0 kB
-Bounce:                0 kB
-WritebackTmp:          0 kB
-CommitLimit:     4087164 kB
-Committed_AS:     901432 kB
-VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB
-VmallocChunk:          0 kB
-HardwareCorrupted:     0 kB
-AnonHugePages:     51200 kB
-CmaTotal:              0 kB
-CmaFree:               0 kB
-
-...
-
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Main entries in /proc
FileContent

/proc/cmdline

– Kernel command line information.

/proc/console

– Information about current consoles including tty.

/proc/crypto

- a list of available cryptographic modules

/proc/devices

– Device drivers currently configured for the running kernel.

/proc/diskstats

- giving some information (including device numbers) for each of the logical disk devices

/proc/dma

– Info about current DMA channels.

/proc/fb

– Framebuffer devices.

/proc/filesystems

– Current filesystems supported by the kernel.

/proc/interrupts, /proc/iomem, /proc/ioports and the directory /proc/irq

- giving some self-explanatory details about the devices (physical or logical) using the various system resources

/proc/iomem

– Current system memory map for devices.

/proc/ioports

– Registered port regions for input output communication with device.

/proc/loadavg

– System load average.

/proc/locks

– Files currently locked by kernel.

/proc/meminfo

– Info about system memory (see above example).

/proc/misc

– Miscellaneous drivers registered for miscellaneous major device.

/proc/modules

- one of the most important files in /proc, containing a list of the kernel modules currently loaded . It gives some indication (not always entirely correct) of dependencies.

/proc/mounts

– List of all mounts in use by system.

/proc/mounts

- a symlink to self/mounts which contains a list of the currently mounted devices and their mount points (and which file system is in use and what mount options are in use).

/proc/net

- a directory containing useful information about the network stack, in particular /proc/net/nf_conntrack, which lists existing network connections (particularly useful for tracking routing when iptables FORWARD is used to redirect network connections)

/proc/partitions

– Detailed info about partitions available to the system.

/proc/pci

– Information about every PCI device.

/proc/stat

– Record or various statistics kept from last reboot.

/proc/swap

– Information about swap space.

/proc/scsi

- giving information about any devices connected via a SCSI or RAID controller

/proc/sysvipc

- containing memory-sharing and inter-process communication (IPC) information.

/proc/tty

- containing information about the current terminals; /proc/tty/driver looks to be[original research?] a list of the different types of tty available - each of which is a list of those of each type

/proc/uptime

– Uptime information (in seconds).

/proc/version

– Kernel version, gcc version, and Linux distribution installed.

-
-
-
-

2. cpu info

-
-
-
-
cat /proc/cpuinfo
-
-processor	: 0
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 2000.000
- cache size	: 1024 KB
- ...
- processor	: 1
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 800.000
- cache size	: 1024 KB
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/enmp3zbqp6g.html b/src-local/LabLearningObject-hybrid-tmp/enmp3zbqp6g.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/enmp3zbqp6g.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/exv9ge57qvi.html b/src-local/LabLearningObject-hybrid-tmp/exv9ge57qvi.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/exv9ge57qvi.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/f0un7p.html b/src-local/LabLearningObject-hybrid-tmp/f0un7p.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/f0un7p.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/f6gj50vcj2m.html b/src-local/LabLearningObject-hybrid-tmp/f6gj50vcj2m.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/f6gj50vcj2m.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/f7xsaglk01a.html b/src-local/LabLearningObject-hybrid-tmp/f7xsaglk01a.html deleted file mode 100644 index a5dae75..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/f7xsaglk01a.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/f8ni2.html b/src-local/LabLearningObject-hybrid-tmp/f8ni2.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/f8ni2.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/f9g3od4khmk.html b/src-local/LabLearningObject-hybrid-tmp/f9g3od4khmk.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/f9g3od4khmk.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/fcmqxjqkegr.html b/src-local/LabLearningObject-hybrid-tmp/fcmqxjqkegr.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/fcmqxjqkegr.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/file b/src-local/LabLearningObject-hybrid-tmp/file deleted file mode 100644 index e69de29..0000000 diff --git a/src-local/LabLearningObject-hybrid-tmp/fjrbqu462l.html b/src-local/LabLearningObject-hybrid-tmp/fjrbqu462l.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/fjrbqu462l.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/fqhoq2ndiq7.html b/src-local/LabLearningObject-hybrid-tmp/fqhoq2ndiq7.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/fqhoq2ndiq7.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/fwuqtg.html b/src-local/LabLearningObject-hybrid-tmp/fwuqtg.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/fwuqtg.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/g59w7.html b/src-local/LabLearningObject-hybrid-tmp/g59w7.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/g59w7.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/g9ddd.html b/src-local/LabLearningObject-hybrid-tmp/g9ddd.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/g9ddd.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/g9v2rm0vcsw.html b/src-local/LabLearningObject-hybrid-tmp/g9v2rm0vcsw.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/g9v2rm0vcsw.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/gdci62z921.html b/src-local/LabLearningObject-hybrid-tmp/gdci62z921.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/gdci62z921.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/git1nx7lasp.html b/src-local/LabLearningObject-hybrid-tmp/git1nx7lasp.html deleted file mode 100644 index 206ae57..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/git1nx7lasp.html +++ /dev/null @@ -1,714 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
- - - - - -
- - -
NOTE
-
-

Assuming you’re already logged in

-
-
-
-
-
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-
-
-
-
-

2. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 6. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-
-
-

3. Find and grep

-
-
-

3.1. find

-
-

The find tool, known from UNIX, is very powerful. This command not only allows you to search file names, it can also accept file size, date of last change and other file properties as criteria for a search.

-
-
-

The most common use is for finding file names:

-
-
- - - - - -
- - -find <path> -name <searchstring> -
-
-
-

This can be interpreted as "Look in all files and subdirectories contained in a given path, and print the names of the files containing the search string in their name" (not in their content).

-
-
-
-
 find /etc -name "*.conf"
-
-
-
-
-

3.2. grep

-
-

grep is used for filtering input lines and returning certain patterns to the output.

-
-
- - - - - -
- - -grep "string" path/to/file -
-
-
-
-
 grep "root" /etc/passwd
-
-
-
-
-

3.3. find and grep command together

-
-

find /etc -name "*.conf" -exec grep -Hns "conf" {} \;

-
-
-
Explanation
-
-
-H, --with-filename
-      Print the filename for each match
--n, --line-number
-      Prefix each line of output with the 1-based line number within its input file
--s, --no-messages
-      Suppress error messages about nonexistent or unreadable files.
-
-
-
- - - - - -
- - -This can be interpreted as
-- "Look for *.conf files and subdirectories contained in /etc, and if true exec grep -Hns conf in the given file" -
-
-
- - - - - -
- - -Very powerful in bash scripts -create a file test.sh -.bash script -
-
-
-
-
#!/bin/bash
-STRING=$(find /etc -name "*.conf" -exec grep -Hns "conf" {} \;)
-echo $STRING
-
-
-
-

exec it -.bash script

-
-
-
-
chmod 700 test.sh
-./test.sh
-
-
-
-
-
-
-

4. Managing software

-
-
-

4.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

4.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

4.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

4.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

4.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

4.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

4.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
- - - - - -
- - -
Reminder
-
-

Caminante, no hay camino,
-se hace camino al andar.

-
-
-

Wanderer, there is no path,
-the path is made by walking.

-
-
-

Antonio Machado Campos de Castilla

-
-
-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/gz9fzag5j36.html b/src-local/LabLearningObject-hybrid-tmp/gz9fzag5j36.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/gz9fzag5j36.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/h0046t19zd.html b/src-local/LabLearningObject-hybrid-tmp/h0046t19zd.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/h0046t19zd.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/h3b8t9ru2.html b/src-local/LabLearningObject-hybrid-tmp/h3b8t9ru2.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/h3b8t9ru2.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/h7shumxlsb.html b/src-local/LabLearningObject-hybrid-tmp/h7shumxlsb.html deleted file mode 100644 index e3cf597..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/h7shumxlsb.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/haeuf7tl5iq.html b/src-local/LabLearningObject-hybrid-tmp/haeuf7tl5iq.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/haeuf7tl5iq.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/hc8am7z2w3.html b/src-local/LabLearningObject-hybrid-tmp/hc8am7z2w3.html deleted file mode 100644 index 212dfea..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/hc8am7z2w3.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Managing software

-
-
-

1.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

1.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

1.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

1.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

1.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

1.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

1.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/hejr75n7xoo.html b/src-local/LabLearningObject-hybrid-tmp/hejr75n7xoo.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/hejr75n7xoo.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/hig4m3.html b/src-local/LabLearningObject-hybrid-tmp/hig4m3.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/hig4m3.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/hl440wq3rnu.html b/src-local/LabLearningObject-hybrid-tmp/hl440wq3rnu.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/hl440wq3rnu.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/hqsh4.html b/src-local/LabLearningObject-hybrid-tmp/hqsh4.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/hqsh4.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/hvn4eqri7uw.html b/src-local/LabLearningObject-hybrid-tmp/hvn4eqri7uw.html deleted file mode 100644 index 195282b..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/hvn4eqri7uw.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

-
-

An operating system kernel that allows multitasking needs processes to have certain states. Names for these states are not standardised, but they have similar functionality.

-
-
-
- -
-
    -
  • -

    the process is "created".

    -
  • -
  • -

    After that the process scheduler assigns it the "waiting" state.

    -
  • -
  • -

    While the process is "waiting", it waits for the scheduler to do a so-called context switch.

    -
  • -
  • -

    The context switch loads the process into the processor and changes the state to "running" while the previously "running" process is stored in a "waiting" state.

    -
  • -
  • -

    If a process in the "running" state needs to wait for a resource, it is assigned the "blocked" state.

    -
  • -
  • -

    The process state is changed back to "waiting" when the process no longer needs to wait (in a blocked state).

    -
  • -
  • -

    Once the process finishes execution, or is terminated by the operating system, it is no longer needed.

    -
  • -
  • -

    The process is removed instantly or is moved to the "terminated" state.

    -
  • -
  • -

    When removed, it just waits to be removed from main memory.

    -
  • -
-
-
-
-
-
-

2.3. Inter-process communication

-
-

When processes need to communicate with each other they must share parts of their address spaces or use other forms of inter-process communication (IPC).

-
-
-
    -
  • -

    For instance in a shell pipeline, the output of the first process need to pass to the second one.

    -
  • -
  • -

    another example is a task that can be decomposed into cooperating but partially independent processes which can run at once

    -
    -
      -
    • -

      (i.e., using concurrency, or true parallelism - the latter model is a particular case of concurrent execution and is feasible whenever enough CPU cores are available for all the processes that are ready to run).

      -
    • -
    -
    -
  • -
-
-
- - - - - -
- - -It is even possible for two or more processes to be running on different machines that may run different operating system (OS), therefore some mechanisms for communication and synchronization (called communications protocols for distributed computing) are needed (e.g., the Message Passing Interface, often simply called MPI). -
-
-
-

2.3.1. communication between processes

-
-

Processes can communicate with each other through:

-
-
-
    -
  • -

    Shared Memory

    -
  • -
  • -

    Message passing

    -
  • -
-
-
-
- - -
-
-
-

[1]

-
-
-
-
-
-
-
-
-
-1. https://www.geeksforgeeks.org/inter-process-communication-ipc/ -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/i7sxjq1xmf.html b/src-local/LabLearningObject-hybrid-tmp/i7sxjq1xmf.html deleted file mode 100644 index a5dae75..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/i7sxjq1xmf.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ig3815wpakc.html b/src-local/LabLearningObject-hybrid-tmp/ig3815wpakc.html deleted file mode 100644 index 212dfea..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ig3815wpakc.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Managing software

-
-
-

1.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

1.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

1.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

1.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

1.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

1.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

1.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/igirpjb745t.html b/src-local/LabLearningObject-hybrid-tmp/igirpjb745t.html deleted file mode 100644 index a71ac57..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/igirpjb745t.html +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-
-
-
-
Life cycle of a process
-
-
- -
-

fork() is the the system call that the parent process uses to "divide" itself ("fork") into two identical processes.

-
-
-
    -
  • -

    After calling fork(), the created child process is an exact copy of the parent except for the return value of the fork() call.

    -
    -
      -
    • -

      This includes open files, register state, and all memory allocations, which includes the program’s executable code. In some cases the two continue to run the same binary,

      -
    • -
    -
    -
  • -
  • -

    the child switches to running another binary executable using the exec() system call.

    -
  • -
-
-
-
-
-
-
-
-
-

1. Life cycle of a process

-
-
-
    -
  • -

    When a process forks, a complete copy of the executing program is made into the new process.

    -
    -
      -
    • -

      This new process is a child of the parent process, and has a new process identifier (PID).

      -
    • -
    -
    -
  • -
  • -

    The fork() function returns the child’s PID to the parent process.

    -
    -
      -
    • -

      The fork() function returns 0 to the child process.

      -
    • -
    • -

      This enables the two identical processes to distinguish one another.

      -
    • -
    -
    -
  • -
  • -

    The parent process can either continue execution or wait for the child process to complete.

    -
  • -
  • -

    The child, after discovering that it is the child, replaces itself completely with another program, so that the code and address space of the original program are lost.

    -
  • -
  • -

    If the parent chooses to wait for the child to die, then the parent will receive the exit code of the program that the child executed.

    -
  • -
  • -

    To prevent the child becoming a zombie the parent should call wait on its children, either periodically or upon receiving the SIGCHLD signal, which indicates a child process has terminated.

    -
  • -
  • -

    One can also asynchronously wait on their children to finish, by using a signal handler for SIGCHLD, if they need to ensure everything is cleaned up.

    -
  • -
-
-
- - - - - -
- - -
-
    -
  • -

    When the child process calls exec(), all data in the original program is lost, and it is replaced with a running copy of the new program.

    -
    -
      -
    • -

      This is known as overlaying.

      -
    • -
    -
    -
  • -
  • -

    Although all data are replaced, the file descriptors that were open in the parent are closed only if the program has explicitly marked them close-on-exec.

    -
  • -
  • -

    This allows for the common practice of the parent creating a pipe prior to calling fork() and using it to communicate with the executed program.

    -
  • -
-
-
-
-
-

1.1. copy-on-write

-
-
-
All processes are sharing the same set of pages and each one gets its own private copy when it wants to modify a page.
-
-
-
-

In such cases, a technique called copy-on-write (COW) is used.

-
-
-

With this technique, when a fork occurs, the parent process’s pages are not copied for the child process.

-
-
-

Instead, the pages are shared between the child and the parent process.

-
-
-

Whenever a process (parent or child) modifies a page, a separate copy of that particular page alone is made for that process (parent or child) which performed the modification.

-
-
-

This process will then use the newly copied page rather than the shared one in all future references. -The other process (the one which did not modify the shared page) continues to use the original copy of the page (which is now no longer shared). This technique is called copy-on-write since the page is copied when some process writes to it.

-
-
- - - - - -
- - -
-

copy-on-write is lazy copying, child process copy the page when try to write it.

-
-
-

So basically, after a fork, almost child’s memory is shared with parent.

-
-
-

Before any of the processes made, every child process still have some private memory, modified from parent’s or new allocating.

-
-
-

That means even without any action the forked child process has some private memory.

-
-
-

We can verify it with

-
-
-
-
cat /proc/PID/smaps
-or
-pmap  PID
-
-
-
-
-
- - - - - -
- - -
-

This operation avoids unnecessary overhead because copying an entire address space is a very slow and inefficient operation which uses a lot of processor time and resources.

-
-
-
-
-
-

1.2. Zombie processes

-
-
-
A child process always first becomes a zombie before being removed from the resource table.
-
-
-
-

When a process ends via exit, all of the memory and resources associated with it are deallocated so they can be used by other processes.

-
-
-

The process’s entry in the process table remains.

-
-
-

The parent can read the child’s exit status by executing the wait system call, whereupon the zombie is removed.

-
-
-

The wait call may be executed in sequential code, but it is commonly executed in a handler for the SIGCHLD signal, which the parent receives whenever a child has died.

-
-
- - - - - -
- - -
-

In most cases, under normal system operation zombies are immediately waited on by their parent and then reaped by the system – processes that stay zombies for a long time are generally an error and cause a resource leak, but the only resource they occupy is the process table entry – process ID.

-
-
-
-
It is not possible to kill such a process with the kill command, because it is already considered dead.
-You can kill the parent process and then the zombie disappears as well.
-
-Zombies can be identified in the output from the Unix ps command by the presence of a "Z" in the "STAT" column
-
-
-
-
-
-
-

1.3. wait

-
-
-
The child process will not be completely removed until the parent process knows of the termination of its child process by the wait() system call.
-
-
-
-

A process (or task) may wait on another process to complete its execution.

-
-
-

The parent process issue a wait system call, which suspends the execution of the parent process while the child executes.

-
-
-

When the child process terminates, it returns an exit status to the operating system, which is then returned to the waiting parent process.

-
-
-

The parent process then resumes execution.

-
-
-
-

1.4. Orphan process

-
-

A child process whose parent process terminates before it does becomes an orphan process.

-
-
-

Such situations are typically handled with a special "root" (or "init") process, which is assigned as the new parent of a process when its parent process exits.

-
-
-

This special process detects when an orphan process terminates and then retrieves its exit status, allowing the system to deallocate the terminated child process.

-
-
-
-

1.5. Process States

-
-
-
ps aux
-
-
-
-

In the STAT column, you’ll see:

-
-
-
    -
  • -

    R: running or runnable, it is just waiting for the CPU to process it

    -
  • -
  • -

    S: Interruptible sleep, waiting for an event to complete, such as input from the terminal

    -
  • -
  • -

    D: Uninterruptible sleep, processes that cannot be killed or interrupted with a signal, usually to make them go away you have to reboot or fix the issue

    -
  • -
  • -

    Z: Zombie, we discussed in a previous lesson that zombies are terminated processes that are waiting to have their statuses collected

    -
  • -
  • -

    T: Stopped, a process that has been suspended/stopped

    -
  • -
-
-
-
-
-
-

2. Thread

-
-
-
-
A thread is an execution unit that has its own program counter, a stack and a set of registers that reside in a process
-
-
-
-

Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources.

-
-
-

The threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variables at any given time.

-
-
-
- -
-

Threads in the same process share:

-
-
-
    -
  • -

    Process instructions

    -
  • -
  • -

    open files, data

    -
  • -
  • -

    signals and signal handlers

    -
  • -
  • -

    current working directory

    -
  • -
  • -

    User and group id

    -
  • -
-
-
-
-
- - - - - -
- - -A thread is also called Light Weight Process (LWP). -
-
-
-

2.1. Implementations

-
-
    -
  • -

    LinuxThreads

    -
    -
      -
    • -

      The default thread implementation since Linux kernel 2.0 (introduced in 1996)

      -
    • -
    -
    -
  • -
  • -

    Native POSIX Thread Library (NPTL)

    -
    -
      -
    • -

      NPTL has been part of Red Hat Enterprise Linux since version 3, and in the Linux kernel since version 2.6. It is now a fully integrated part of the GNU C Library.

      -
    • -
    -
    -
  • -
  • -

    Next Generation POSIX Thread (NGPT)

    -
    -
      -
    • -

      A IBM developed version of POSIX thread library. The NGPT team collaborated closely with the NPTL team and combined the best features of both implementations into NPTL.

      -
    • -
    -
    -
  • -
-
-
-
-

2.2. Threads vs. processes pros and cons

-
-
    -
  • -

    processes are typically independent, while threads exist as subsets of a process

    -
  • -
  • -

    processes carry considerably more state information than threads, whereas multiple threads within a process share process state as well as memory and other resources

    -
  • -
  • -

    processes have separate address spaces, whereas threads share their address space

    -
  • -
  • -

    processes interact only through system-provided inter-process communication mechanisms

    -
  • -
  • -

    context switching between threads in the same process typically occurs faster than context switching between processes

    -
  • -
-
-
-

Advantages and disadvantages of threads vs processes include:

-
-
-
    -
  • -

    Lower resource consumption of threads: using threads, an application can operate using fewer resources than it would need when using multiple processes.

    -
  • -
  • -

    Simplified sharing and communication of threads: unlike processes, which require a message passing or shared memory mechanism to perform inter-process communication (IPC), threads can communicate through data, code and files they already share.

    -
  • -
-
-
- - - - - -
- - -Thread crashes a process: due to threads sharing the same address space, an illegal operation performed by a thread can crash the entire process; therefore, one misbehaving thread can disrupt the processing of all the other threads in the application. -
-
-
-

2.2.1. When should you prefer fork() over threading and vice-verse?

-
-

When you’re doing a far more complex task than just instantiating a worker, or you want the implicit security sandboxing of separate processes.

-
-
-
-

2.2.2. If I want to call an external application as a child, then should I use fork() or threads to do it?

-
-

If the child will do an identical task to the parent, with identical code, use fork. For smaller subtasks use threads.

-
-
-
-

2.2.3. it is bad thing to call a fork() inside a thread?

-
-

it’s computationally rather expensive to duplicate a process and a lot of subthreads.

-
-
-
-
-
-
-

3. Process Memory

-
-
-
-
A process uses its own memory area to perform work.
-
-
-
-
- -
-
    -
  • -

    Text Segment.

    -
    -
      -
    • -

      The Text segment (a.k.a the Instruction segment) contains the executable program code and constant data.

      -
    • -
    -
    -
  • -
  • -

    Data Segment

    -
    -
      -
    • -

      Heap

      -
      -
        -
      • -

        Heap is the segment from which the memory is provided. (e.g. malloc())

        -
      • -
      -
      -
    • -
    • -

      BSS:

      -
      -
        -
      • -

        The area where zero-initialized data is stored. All the global variable which are not initialized in the program are stored in the BSS segment.

        -
      • -
      -
      -
    • -
    • -

      Data:

      -
      -
        -
      • -

        The area where initialized data are stored.

        -
      • -
      -
      -
    • -
    -
    -
  • -
  • -

    Stack Segment

    -
    -
      -
    • -

      The stack segment is used by the process for the storage of automatic identifier, register variables, and function call information.

      -
    • -
    -
    -
  • -
-
-
-
-
-
what process is attached to a shared memory segment?
-
-
You can use:
-ipcs -mp to get the process ID
-and
-with the command grep [shared memory segment] /proc/*/maps
-
-
-
- - - - - -
- - -ipcs shows information on the inter-process communication facilities for which the calling process has read access. -By default it shows information about all three resources: shared memory segments, message queues, and semaphore arrays. -
-
-
-
-
-

4. Process priority (nice)

-
-
-

In Linux we can set guidelines for the CPU to follow when it is looking at all the tasks it has to do. -These guidelines are called niceness or nice value.

-
-
-

The "niceness" scale goes from

-
-
-
    -
  • -

    -20 (highest priority value)

    -
  • -
  • -

    19 (lowest priority value)

    -
  • -
  • -

    default is 0

    -
  • -
-
-
-

The nice priority is actually used for user programs.

-
-
- - - - - -
- - -Priority is all about managing processor time -
-
-
-
-
nice  run a program with modified scheduling priority
-chrt  allows to set your scheduling policy as well as priority.
-
-
-
-
-
-

5. Scheduler

-
-
-
- -
-
-
The scheduler is the Linux kernel part that decides which runnable process will be executed by the CPU next.
-
-
-
-

It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

-
-
-
-
- - - - - -
- - -
-

The scheduler makes it possible to execute multiple programs at the same time, thus sharing the CPU with users of varying needs.

-
-
-
    -
  • -

    Minimizing response time

    -
  • -
  • -

    Maximizing overall CPU utilization

    -
  • -
-
-
-
-
- - - - - -
- - -Since Linux 2.6.23, the default scheduler is CFS, the "Completely Fair Scheduler". The - CFS scheduler replaced the earlier "O(1)" scheduler. [5] [6] -
-
-
-
-
-

6. Context switching

-
-
-

Context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point. -This allows multiple processes to share a single central processing unit (CPU), and is an essential feature of a multitasking operating system.

-
-
-

In the Linux kernel, context switching involves

-
-
-
    -
  • -

    switching registers

    -
  • -
  • -

    stack pointer

    -
  • -
  • -

    program counter

    -
  • -
  • -

    flushing the translation lookaside buffer (TLB)

    -
  • -
  • -

    and loading the page table of the next process to run (unless the old process shares the memory with the new).

    -
  • -
-
-
-
-
-

7. Interrupts

-
-
-

An interrupt is an event that alters the normal execution flow of a program and can be generated by hardware devices or even by the CPU itself.

-
-
-

Interrupts can be grouped into two categories based on the source of the interrupt:

-
-
-
    -
  • -

    synchronous, generated by executing an instruction

    -
  • -
  • -

    asynchronous, generated by an external event

    -
    -
      -
    • -

      For example a network card generates an interrupts to signal that a packet has arrived.

      -
    • -
    -
    -
  • -
-
-
-
-
Information related to hard interrupts at /proc/interrupts
-
-
-
-
-
-
-
-
-1. http://www.it.uu.se/education/course/homepage/os/vt18/images/module-2/fork-exec-exit-wait.png -
-
-2. https://commons.wikimedia.org/w/index.php?curid=2233446 -
-
-3. https://gabrieletolomei.files.wordpress.com/2013/10/program_in_memory2.png?w=960 -
-
-4. By ScotXW - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=47075153 -
-
-5. https://en.wikipedia.org/wiki/Completely_Fair_Scheduler -
-
-6. https://www.kernel.org/doc/html/latest/scheduler/index.html -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ilkrnn6cbmf.html b/src-local/LabLearningObject-hybrid-tmp/ilkrnn6cbmf.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ilkrnn6cbmf.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/imjwbntkj3d.html b/src-local/LabLearningObject-hybrid-tmp/imjwbntkj3d.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/imjwbntkj3d.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/iqun9ljkwqd.html b/src-local/LabLearningObject-hybrid-tmp/iqun9ljkwqd.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/iqun9ljkwqd.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/irms6yrg3xa.html b/src-local/LabLearningObject-hybrid-tmp/irms6yrg3xa.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/irms6yrg3xa.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/is7b5.html b/src-local/LabLearningObject-hybrid-tmp/is7b5.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/is7b5.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/j4zle1dnbqb.html b/src-local/LabLearningObject-hybrid-tmp/j4zle1dnbqb.html deleted file mode 100644 index 9c97878..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/j4zle1dnbqb.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/j60xh3p1crr.html b/src-local/LabLearningObject-hybrid-tmp/j60xh3p1crr.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/j60xh3p1crr.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/j79egukh06k.html b/src-local/LabLearningObject-hybrid-tmp/j79egukh06k.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/j79egukh06k.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/jbybog.html b/src-local/LabLearningObject-hybrid-tmp/jbybog.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/jbybog.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/jfvi9c.html b/src-local/LabLearningObject-hybrid-tmp/jfvi9c.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/jfvi9c.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ji8zo6fouvc.html b/src-local/LabLearningObject-hybrid-tmp/ji8zo6fouvc.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ji8zo6fouvc.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/jjgf9.html b/src-local/LabLearningObject-hybrid-tmp/jjgf9.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/jjgf9.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/jpf352o0vt.html b/src-local/LabLearningObject-hybrid-tmp/jpf352o0vt.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/jpf352o0vt.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/jr3wferc76.html b/src-local/LabLearningObject-hybrid-tmp/jr3wferc76.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/jr3wferc76.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/jznztcyblum.html b/src-local/LabLearningObject-hybrid-tmp/jznztcyblum.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/jznztcyblum.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/k1o2fuzkjec.html b/src-local/LabLearningObject-hybrid-tmp/k1o2fuzkjec.html deleted file mode 100644 index 36d6f0a..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/k1o2fuzkjec.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
- - - - - -
- - -
NOTE
-
-

Assuming you’re already logged in

-
-
-
-
-
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/k2fgzwcrekr.html b/src-local/LabLearningObject-hybrid-tmp/k2fgzwcrekr.html deleted file mode 100644 index 9140409..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/k2fgzwcrekr.html +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-
-
-
-
Life cycle of a process
-
-
- -
-

fork() is the the system call that the parent process uses to "divide" itself ("fork") into two identical processes.

-
-
-
    -
  • -

    After calling fork(), the created child process is an exact copy of the parent except for the return value of the fork() call.

    -
    -
      -
    • -

      This includes open files, register state, and all memory allocations, which includes the program’s executable code. In some cases the two continue to run the same binary,

      -
    • -
    -
    -
  • -
  • -

    the child switches to running another binary executable using the exec() system call.

    -
  • -
-
-
-
-
-
-
-
-
-

1. Life cycle of a process

-
-
-
    -
  • -

    When a process forks, a complete copy of the executing program is made into the new process.

    -
    -
      -
    • -

      This new process is a child of the parent process, and has a new process identifier (PID).

      -
    • -
    -
    -
  • -
  • -

    The fork() function returns the child’s PID to the parent process.

    -
    -
      -
    • -

      The fork() function returns 0 to the child process.

      -
    • -
    • -

      This enables the two identical processes to distinguish one another.

      -
    • -
    -
    -
  • -
  • -

    The parent process can either continue execution or wait for the child process to complete.

    -
  • -
  • -

    The child, after discovering that it is the child, replaces itself completely with another program, so that the code and address space of the original program are lost.

    -
  • -
  • -

    If the parent chooses to wait for the child to die, then the parent will receive the exit code of the program that the child executed.

    -
  • -
  • -

    To prevent the child becoming a zombie the parent should call wait on its children, either periodically or upon receiving the SIGCHLD signal, which indicates a child process has terminated.

    -
  • -
  • -

    One can also asynchronously wait on their children to finish, by using a signal handler for SIGCHLD, if they need to ensure everything is cleaned up.

    -
  • -
-
-
- - - - - -
- - -
-
    -
  • -

    When the child process calls exec(), all data in the original program is lost, and it is replaced with a running copy of the new program.

    -
    -
      -
    • -

      This is known as overlaying.

      -
    • -
    -
    -
  • -
  • -

    Although all data are replaced, the file descriptors that were open in the parent are closed only if the program has explicitly marked them close-on-exec.

    -
  • -
  • -

    This allows for the common practice of the parent creating a pipe prior to calling fork() and using it to communicate with the executed program.

    -
  • -
-
-
-
-
-

1.1. copy-on-write

-
-
-
All processes are sharing the same set of pages and each one gets its own private copy when it wants to modify a page.
-
-
-
-

In such cases, a technique called copy-on-write (COW) is used.

-
-
-

With this technique, when a fork occurs, the parent process’s pages are not copied for the child process.

-
-
-

Instead, the pages are shared between the child and the parent process.

-
-
-

Whenever a process (parent or child) modifies a page, a separate copy of that particular page alone is made for that process (parent or child) which performed the modification.

-
-
-

This process will then use the newly copied page rather than the shared one in all future references. -The other process (the one which did not modify the shared page) continues to use the original copy of the page (which is now no longer shared). This technique is called copy-on-write since the page is copied when some process writes to it.

-
-
- - - - - -
- - -
-

copy-on-write is lazy copying, child process copy the page when try to write it.

-
-
-

So basically, after a fork, almost child’s memory is shared with parent.

-
-
-

Before any of the processes made, every child process still have some private memory, modified from parent’s or new allocating.

-
-
-

That means even without any action the forked child process has some private memory.

-
-
-

We can verify it with

-
-
-
-
cat /proc/PID/smaps
-or
-pmap  PID
-
-
-
-
-
- - - - - -
- - -
-

This operation avoids unnecessary overhead because copying an entire address space is a very slow and inefficient operation which uses a lot of processor time and resources.

-
-
-
-
-
-

1.2. Zombie processes

-
-
-
A child process always first becomes a zombie before being removed from the resource table.
-
-
-
-

When a process ends via exit, all of the memory and resources associated with it are deallocated so they can be used by other processes.

-
-
-

The process’s entry in the process table remains.

-
-
-

The parent can read the child’s exit status by executing the wait system call, whereupon the zombie is removed.

-
-
-

The wait call may be executed in sequential code, but it is commonly executed in a handler for the SIGCHLD signal, which the parent receives whenever a child has died.

-
-
- - - - - -
- - -
-

In most cases, under normal system operation zombies are immediately waited on by their parent and then reaped by the system – processes that stay zombies for a long time are generally an error and cause a resource leak, but the only resource they occupy is the process table entry – process ID.

-
-
-
-
It is not possible to kill such a process with the kill command, because it is already considered dead.
-You can kill the parent process and then the zombie disappears as well.
-
-Zombies can be identified in the output from the Unix ps command by the presence of a "Z" in the "STAT" column
-
-
-
-
-
-
-

1.3. wait

-
-
-
The child process will not be completely removed until the parent process knows of the termination of its child process by the wait() system call.
-
-
-
-

A process (or task) may wait on another process to complete its execution.

-
-
-

The parent process issue a wait system call, which suspends the execution of the parent process while the child executes.

-
-
-

When the child process terminates, it returns an exit status to the operating system, which is then returned to the waiting parent process.

-
-
-

The parent process then resumes execution.

-
-
-
-

1.4. Orphan process

-
-

A child process whose parent process terminates before it does becomes an orphan process.

-
-
-

Such situations are typically handled with a special "root" (or "init") process, which is assigned as the new parent of a process when its parent process exits.

-
-
-

This special process detects when an orphan process terminates and then retrieves its exit status, allowing the system to deallocate the terminated child process.

-
-
-
-

1.5. Process States

-
-
-
ps aux
-
-
-
-

In the STAT column, you’ll see:

-
-
-
    -
  • -

    R: running or runnable, it is just waiting for the CPU to process it

    -
  • -
  • -

    S: Interruptible sleep, waiting for an event to complete, such as input from the terminal

    -
  • -
  • -

    D: Uninterruptible sleep, processes that cannot be killed or interrupted with a signal, usually to make them go away you have to reboot or fix the issue

    -
  • -
  • -

    Z: Zombie, we discussed in a previous lesson that zombies are terminated processes that are waiting to have their statuses collected

    -
  • -
  • -

    T: Stopped, a process that has been suspended/stopped

    -
  • -
-
-
-
-
-
-

2. Thread

-
-
-
-
A thread is an execution unit that has its own program counter, a stack and a set of registers that reside in a process
-
-
-
-

Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources.

-
-
-

The threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variables at any given time.

-
-
-
- -
-

Threads in the same process share:

-
-
-
    -
  • -

    Process instructions

    -
  • -
  • -

    open files, data

    -
  • -
  • -

    signals and signal handlers

    -
  • -
  • -

    current working directory

    -
  • -
  • -

    User and group id

    -
  • -
-
-
-
-
- - - - - -
- - -A thread is also called Light Weight Process (LWP). -
-
-
-

2.1. Implementations

-
-
    -
  • -

    LinuxThreads

    -
    -
      -
    • -

      The default thread implementation since Linux kernel 2.0 (introduced in 1996)

      -
    • -
    -
    -
  • -
  • -

    Native POSIX Thread Library (NPTL)

    -
    -
      -
    • -

      NPTL has been part of Red Hat Enterprise Linux since version 3, and in the Linux kernel since version 2.6. It is now a fully integrated part of the GNU C Library.

      -
    • -
    -
    -
  • -
  • -

    Next Generation POSIX Thread (NGPT)

    -
    -
      -
    • -

      A IBM developed version of POSIX thread library. The NGPT team collaborated closely with the NPTL team and combined the best features of both implementations into NPTL.

      -
    • -
    -
    -
  • -
-
-
-
-

2.2. Threads vs. processes pros and cons

-
-
    -
  • -

    processes are typically independent, while threads exist as subsets of a process

    -
  • -
  • -

    processes carry considerably more state information than threads, whereas multiple threads within a process share process state as well as memory and other resources

    -
  • -
  • -

    processes have separate address spaces, whereas threads share their address space

    -
  • -
  • -

    processes interact only through system-provided inter-process communication mechanisms

    -
  • -
  • -

    context switching between threads in the same process typically occurs faster than context switching between processes

    -
  • -
-
-
-

Advantages and disadvantages of threads vs processes include:

-
-
-
    -
  • -

    Lower resource consumption of threads: using threads, an application can operate using fewer resources than it would need when using multiple processes.

    -
  • -
  • -

    Simplified sharing and communication of threads: unlike processes, which require a message passing or shared memory mechanism to perform inter-process communication (IPC), threads can communicate through data, code and files they already share.

    -
  • -
-
-
- - - - - -
- - -Thread crashes a process: due to threads sharing the same address space, an illegal operation performed by a thread can crash the entire process; therefore, one misbehaving thread can disrupt the processing of all the other threads in the application. -
-
-
-

2.2.1. When should you prefer fork() over threading and vice-verse?

-
-

When you’re doing a far more complex task than just instantiating a worker, or you want the implicit security sandboxing of separate processes.

-
-
-
-

2.2.2. If I want to call an external application as a child, then should I use fork() or threads to do it?

-
-

If the child will do an identical task to the parent, with identical code, use fork. For smaller subtasks use threads.

-
-
-
-

2.2.3. it is bad thing to call a fork() inside a thread?

-
-

it’s computationally rather expensive to duplicate a process and a lot of subthreads.

-
-
-
-
-
-
-

3. Process Memory

-
-
-
-
A process uses its own memory area to perform work.
-
-
-
-
- -
-
    -
  • -

    Text Segment.

    -
    -
      -
    • -

      The Text segment (a.k.a the Instruction segment) contains the executable program code and constant data.

      -
    • -
    -
    -
  • -
  • -

    Data Segment

    -
    -
      -
    • -

      Heap

      -
      -
        -
      • -

        Heap is the segment from which the memory is provided. (e.g. malloc())

        -
      • -
      -
      -
    • -
    • -

      BSS:

      -
      -
        -
      • -

        The area where zero-initialized data is stored. All the global variable which are not initialized in the program are stored in the BSS segment.

        -
      • -
      -
      -
    • -
    • -

      Data:

      -
      -
        -
      • -

        The area where initialized data are stored.

        -
      • -
      -
      -
    • -
    -
    -
  • -
  • -

    Stack Segment

    -
    -
      -
    • -

      The stack segment is used by the process for the storage of automatic identifier, register variables, and function call information.

      -
    • -
    -
    -
  • -
-
-
-
-
-
what process is attached to a shared memory segment?
-
-
You can use:
-ipcs -mp to get the process ID
-and
-with the command grep [shared memory segment] /proc/*/maps
-
-
-
- - - - - -
- - -ipcs shows information on the inter-process communication facilities for which the calling process has read access. -By default it shows information about all three resources: shared memory segments, message queues, and semaphore arrays. -
-
-
-
-
-

4. Process priority (nice)

-
-
-

In Linux we can set guidelines for the CPU to follow when it is looking at all the tasks it has to do. -These guidelines are called niceness or nice value.

-
-
-

The "niceness" scale goes from

-
-
-
    -
  • -

    -20 (highest priority value)

    -
  • -
  • -

    19 (lowest priority value)

    -
  • -
  • -

    default is 0

    -
  • -
-
-
-

The nice priority is actually used for user programs.

-
-
- - - - - -
- - -Priority is all about managing processor time -
-
-
-
-
nice  run a program with modified scheduling priority
-chrt  allows to set your scheduling policy as well as priority.
-
-
-
-
-
-

5. Scheduler

-
-
-
- -
-
-
The scheduler is the Linux kernel part that decides which runnable process will be executed by the CPU next.
-
-
-
-

It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

-
-
-
-
- - - - - -
- - -
-

The scheduler makes it possible to execute multiple programs at the same time, thus sharing the CPU with users of varying needs.

-
-
-
    -
  • -

    Minimizing response time

    -
  • -
  • -

    Maximizing overall CPU utilization

    -
  • -
-
-
-
-
- - - - - -
- - -Since Linux 2.6.23, the default scheduler is CFS, the "Completely Fair Scheduler". The - CFS scheduler replaced the earlier "O(1)" scheduler. [5] [6] -
-
-
-
-
-

6. Context switching

-
-
-

Context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point. -This allows multiple processes to share a single central processing unit (CPU), and is an essential feature of a multitasking operating system.

-
-
-

In the Linux kernel, context switching involves

-
-
-
    -
  • -

    switching registers

    -
  • -
  • -

    stack pointer

    -
  • -
  • -

    program counter

    -
  • -
  • -

    flushing the translation lookaside buffer (TLB)

    -
  • -
  • -

    and loading the page table of the next process to run (unless the old process shares the memory with the new).

    -
  • -
-
-
-
-
-

7. Interrupts

-
-
-

An interrupt is an event that alters the normal execution flow of a program and can be generated by hardware devices or even by the CPU itself.

-
-
-

Interrupts can be grouped into two categories based on the source of the interrupt:

-
-
-
    -
  • -

    synchronous, generated by executing an instruction

    -
  • -
  • -

    asynchronous, generated by an external event

    -
    -
      -
    • -

      For example a network card generates an interrupts to signal that a packet has arrived.

      -
    • -
    -
    -
  • -
-
-
-
-
Information related to hard interrupts at /proc/interrupts
-
-
-
-
-
-
-
-
-1. http://www.it.uu.se/education/course/homepage/os/vt18/images/module-2/fork-exec-exit-wait.png -
-
-2. https://commons.wikimedia.org/w/index.php?curid=2233446 -
-
-3. https://gabrieletolomei.files.wordpress.com/2013/10/program_in_memory2.png?w=960 -
-
-4. By ScotXW - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=47075153 -
-
-5. https://en.wikipedia.org/wiki/Completely_Fair_Scheduler -
-
-6. https://www.kernel.org/doc/html/latest/scheduler/index.html -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/k85fav.html b/src-local/LabLearningObject-hybrid-tmp/k85fav.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/k85fav.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/kbqjb3card.html b/src-local/LabLearningObject-hybrid-tmp/kbqjb3card.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/kbqjb3card.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/kdsqpplmq6d.html b/src-local/LabLearningObject-hybrid-tmp/kdsqpplmq6d.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/kdsqpplmq6d.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/kk5h3tpvwwa.html b/src-local/LabLearningObject-hybrid-tmp/kk5h3tpvwwa.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/kk5h3tpvwwa.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/kn8pll65kk.html b/src-local/LabLearningObject-hybrid-tmp/kn8pll65kk.html deleted file mode 100644 index 9c97878..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/kn8pll65kk.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/kokznc.html b/src-local/LabLearningObject-hybrid-tmp/kokznc.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/kokznc.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/kqbai97wrt8.html b/src-local/LabLearningObject-hybrid-tmp/kqbai97wrt8.html deleted file mode 100644 index dff2c6a..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/kqbai97wrt8.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ktdgb9.html b/src-local/LabLearningObject-hybrid-tmp/ktdgb9.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ktdgb9.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ku8q7e7f8g.html b/src-local/LabLearningObject-hybrid-tmp/ku8q7e7f8g.html deleted file mode 100644 index 9c97878..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ku8q7e7f8g.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/l28n75t3hd.html b/src-local/LabLearningObject-hybrid-tmp/l28n75t3hd.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/l28n75t3hd.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/l5v5jo.html b/src-local/LabLearningObject-hybrid-tmp/l5v5jo.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/l5v5jo.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/l9dm7x0i89m.html b/src-local/LabLearningObject-hybrid-tmp/l9dm7x0i89m.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/l9dm7x0i89m.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ljqs83or4u.html b/src-local/LabLearningObject-hybrid-tmp/ljqs83or4u.html deleted file mode 100644 index a0007bf..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ljqs83or4u.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

-
-

An operating system kernel that allows multitasking needs processes to have certain states. Names for these states are not standardised, but they have similar functionality.

-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/lozxt2.html b/src-local/LabLearningObject-hybrid-tmp/lozxt2.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/lozxt2.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/lreoyc08wc.html b/src-local/LabLearningObject-hybrid-tmp/lreoyc08wc.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/lreoyc08wc.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/luhlg.html b/src-local/LabLearningObject-hybrid-tmp/luhlg.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/luhlg.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/m0195j.html b/src-local/LabLearningObject-hybrid-tmp/m0195j.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/m0195j.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/m7zy5c65orm.html b/src-local/LabLearningObject-hybrid-tmp/m7zy5c65orm.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/m7zy5c65orm.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/mabj164260d.html b/src-local/LabLearningObject-hybrid-tmp/mabj164260d.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/mabj164260d.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/mdy44shp9ac.html b/src-local/LabLearningObject-hybrid-tmp/mdy44shp9ac.html deleted file mode 100644 index 9c97878..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/mdy44shp9ac.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/men5ko8mdj.html b/src-local/LabLearningObject-hybrid-tmp/men5ko8mdj.html deleted file mode 100644 index 9140409..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/men5ko8mdj.html +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-
-
-
-
Life cycle of a process
-
-
- -
-

fork() is the the system call that the parent process uses to "divide" itself ("fork") into two identical processes.

-
-
-
    -
  • -

    After calling fork(), the created child process is an exact copy of the parent except for the return value of the fork() call.

    -
    -
      -
    • -

      This includes open files, register state, and all memory allocations, which includes the program’s executable code. In some cases the two continue to run the same binary,

      -
    • -
    -
    -
  • -
  • -

    the child switches to running another binary executable using the exec() system call.

    -
  • -
-
-
-
-
-
-
-
-
-

1. Life cycle of a process

-
-
-
    -
  • -

    When a process forks, a complete copy of the executing program is made into the new process.

    -
    -
      -
    • -

      This new process is a child of the parent process, and has a new process identifier (PID).

      -
    • -
    -
    -
  • -
  • -

    The fork() function returns the child’s PID to the parent process.

    -
    -
      -
    • -

      The fork() function returns 0 to the child process.

      -
    • -
    • -

      This enables the two identical processes to distinguish one another.

      -
    • -
    -
    -
  • -
  • -

    The parent process can either continue execution or wait for the child process to complete.

    -
  • -
  • -

    The child, after discovering that it is the child, replaces itself completely with another program, so that the code and address space of the original program are lost.

    -
  • -
  • -

    If the parent chooses to wait for the child to die, then the parent will receive the exit code of the program that the child executed.

    -
  • -
  • -

    To prevent the child becoming a zombie the parent should call wait on its children, either periodically or upon receiving the SIGCHLD signal, which indicates a child process has terminated.

    -
  • -
  • -

    One can also asynchronously wait on their children to finish, by using a signal handler for SIGCHLD, if they need to ensure everything is cleaned up.

    -
  • -
-
-
- - - - - -
- - -
-
    -
  • -

    When the child process calls exec(), all data in the original program is lost, and it is replaced with a running copy of the new program.

    -
    -
      -
    • -

      This is known as overlaying.

      -
    • -
    -
    -
  • -
  • -

    Although all data are replaced, the file descriptors that were open in the parent are closed only if the program has explicitly marked them close-on-exec.

    -
  • -
  • -

    This allows for the common practice of the parent creating a pipe prior to calling fork() and using it to communicate with the executed program.

    -
  • -
-
-
-
-
-

1.1. copy-on-write

-
-
-
All processes are sharing the same set of pages and each one gets its own private copy when it wants to modify a page.
-
-
-
-

In such cases, a technique called copy-on-write (COW) is used.

-
-
-

With this technique, when a fork occurs, the parent process’s pages are not copied for the child process.

-
-
-

Instead, the pages are shared between the child and the parent process.

-
-
-

Whenever a process (parent or child) modifies a page, a separate copy of that particular page alone is made for that process (parent or child) which performed the modification.

-
-
-

This process will then use the newly copied page rather than the shared one in all future references. -The other process (the one which did not modify the shared page) continues to use the original copy of the page (which is now no longer shared). This technique is called copy-on-write since the page is copied when some process writes to it.

-
-
- - - - - -
- - -
-

copy-on-write is lazy copying, child process copy the page when try to write it.

-
-
-

So basically, after a fork, almost child’s memory is shared with parent.

-
-
-

Before any of the processes made, every child process still have some private memory, modified from parent’s or new allocating.

-
-
-

That means even without any action the forked child process has some private memory.

-
-
-

We can verify it with

-
-
-
-
cat /proc/PID/smaps
-or
-pmap  PID
-
-
-
-
-
- - - - - -
- - -
-

This operation avoids unnecessary overhead because copying an entire address space is a very slow and inefficient operation which uses a lot of processor time and resources.

-
-
-
-
-
-

1.2. Zombie processes

-
-
-
A child process always first becomes a zombie before being removed from the resource table.
-
-
-
-

When a process ends via exit, all of the memory and resources associated with it are deallocated so they can be used by other processes.

-
-
-

The process’s entry in the process table remains.

-
-
-

The parent can read the child’s exit status by executing the wait system call, whereupon the zombie is removed.

-
-
-

The wait call may be executed in sequential code, but it is commonly executed in a handler for the SIGCHLD signal, which the parent receives whenever a child has died.

-
-
- - - - - -
- - -
-

In most cases, under normal system operation zombies are immediately waited on by their parent and then reaped by the system – processes that stay zombies for a long time are generally an error and cause a resource leak, but the only resource they occupy is the process table entry – process ID.

-
-
-
-
It is not possible to kill such a process with the kill command, because it is already considered dead.
-You can kill the parent process and then the zombie disappears as well.
-
-Zombies can be identified in the output from the Unix ps command by the presence of a "Z" in the "STAT" column
-
-
-
-
-
-
-

1.3. wait

-
-
-
The child process will not be completely removed until the parent process knows of the termination of its child process by the wait() system call.
-
-
-
-

A process (or task) may wait on another process to complete its execution.

-
-
-

The parent process issue a wait system call, which suspends the execution of the parent process while the child executes.

-
-
-

When the child process terminates, it returns an exit status to the operating system, which is then returned to the waiting parent process.

-
-
-

The parent process then resumes execution.

-
-
-
-

1.4. Orphan process

-
-

A child process whose parent process terminates before it does becomes an orphan process.

-
-
-

Such situations are typically handled with a special "root" (or "init") process, which is assigned as the new parent of a process when its parent process exits.

-
-
-

This special process detects when an orphan process terminates and then retrieves its exit status, allowing the system to deallocate the terminated child process.

-
-
-
-

1.5. Process States

-
-
-
ps aux
-
-
-
-

In the STAT column, you’ll see:

-
-
-
    -
  • -

    R: running or runnable, it is just waiting for the CPU to process it

    -
  • -
  • -

    S: Interruptible sleep, waiting for an event to complete, such as input from the terminal

    -
  • -
  • -

    D: Uninterruptible sleep, processes that cannot be killed or interrupted with a signal, usually to make them go away you have to reboot or fix the issue

    -
  • -
  • -

    Z: Zombie, we discussed in a previous lesson that zombies are terminated processes that are waiting to have their statuses collected

    -
  • -
  • -

    T: Stopped, a process that has been suspended/stopped

    -
  • -
-
-
-
-
-
-

2. Thread

-
-
-
-
A thread is an execution unit that has its own program counter, a stack and a set of registers that reside in a process
-
-
-
-

Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources.

-
-
-

The threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variables at any given time.

-
-
-
- -
-

Threads in the same process share:

-
-
-
    -
  • -

    Process instructions

    -
  • -
  • -

    open files, data

    -
  • -
  • -

    signals and signal handlers

    -
  • -
  • -

    current working directory

    -
  • -
  • -

    User and group id

    -
  • -
-
-
-
-
- - - - - -
- - -A thread is also called Light Weight Process (LWP). -
-
-
-

2.1. Implementations

-
-
    -
  • -

    LinuxThreads

    -
    -
      -
    • -

      The default thread implementation since Linux kernel 2.0 (introduced in 1996)

      -
    • -
    -
    -
  • -
  • -

    Native POSIX Thread Library (NPTL)

    -
    -
      -
    • -

      NPTL has been part of Red Hat Enterprise Linux since version 3, and in the Linux kernel since version 2.6. It is now a fully integrated part of the GNU C Library.

      -
    • -
    -
    -
  • -
  • -

    Next Generation POSIX Thread (NGPT)

    -
    -
      -
    • -

      A IBM developed version of POSIX thread library. The NGPT team collaborated closely with the NPTL team and combined the best features of both implementations into NPTL.

      -
    • -
    -
    -
  • -
-
-
-
-

2.2. Threads vs. processes pros and cons

-
-
    -
  • -

    processes are typically independent, while threads exist as subsets of a process

    -
  • -
  • -

    processes carry considerably more state information than threads, whereas multiple threads within a process share process state as well as memory and other resources

    -
  • -
  • -

    processes have separate address spaces, whereas threads share their address space

    -
  • -
  • -

    processes interact only through system-provided inter-process communication mechanisms

    -
  • -
  • -

    context switching between threads in the same process typically occurs faster than context switching between processes

    -
  • -
-
-
-

Advantages and disadvantages of threads vs processes include:

-
-
-
    -
  • -

    Lower resource consumption of threads: using threads, an application can operate using fewer resources than it would need when using multiple processes.

    -
  • -
  • -

    Simplified sharing and communication of threads: unlike processes, which require a message passing or shared memory mechanism to perform inter-process communication (IPC), threads can communicate through data, code and files they already share.

    -
  • -
-
-
- - - - - -
- - -Thread crashes a process: due to threads sharing the same address space, an illegal operation performed by a thread can crash the entire process; therefore, one misbehaving thread can disrupt the processing of all the other threads in the application. -
-
-
-

2.2.1. When should you prefer fork() over threading and vice-verse?

-
-

When you’re doing a far more complex task than just instantiating a worker, or you want the implicit security sandboxing of separate processes.

-
-
-
-

2.2.2. If I want to call an external application as a child, then should I use fork() or threads to do it?

-
-

If the child will do an identical task to the parent, with identical code, use fork. For smaller subtasks use threads.

-
-
-
-

2.2.3. it is bad thing to call a fork() inside a thread?

-
-

it’s computationally rather expensive to duplicate a process and a lot of subthreads.

-
-
-
-
-
-
-

3. Process Memory

-
-
-
-
A process uses its own memory area to perform work.
-
-
-
-
- -
-
    -
  • -

    Text Segment.

    -
    -
      -
    • -

      The Text segment (a.k.a the Instruction segment) contains the executable program code and constant data.

      -
    • -
    -
    -
  • -
  • -

    Data Segment

    -
    -
      -
    • -

      Heap

      -
      -
        -
      • -

        Heap is the segment from which the memory is provided. (e.g. malloc())

        -
      • -
      -
      -
    • -
    • -

      BSS:

      -
      -
        -
      • -

        The area where zero-initialized data is stored. All the global variable which are not initialized in the program are stored in the BSS segment.

        -
      • -
      -
      -
    • -
    • -

      Data:

      -
      -
        -
      • -

        The area where initialized data are stored.

        -
      • -
      -
      -
    • -
    -
    -
  • -
  • -

    Stack Segment

    -
    -
      -
    • -

      The stack segment is used by the process for the storage of automatic identifier, register variables, and function call information.

      -
    • -
    -
    -
  • -
-
-
-
-
-
what process is attached to a shared memory segment?
-
-
You can use:
-ipcs -mp to get the process ID
-and
-with the command grep [shared memory segment] /proc/*/maps
-
-
-
- - - - - -
- - -ipcs shows information on the inter-process communication facilities for which the calling process has read access. -By default it shows information about all three resources: shared memory segments, message queues, and semaphore arrays. -
-
-
-
-
-

4. Process priority (nice)

-
-
-

In Linux we can set guidelines for the CPU to follow when it is looking at all the tasks it has to do. -These guidelines are called niceness or nice value.

-
-
-

The "niceness" scale goes from

-
-
-
    -
  • -

    -20 (highest priority value)

    -
  • -
  • -

    19 (lowest priority value)

    -
  • -
  • -

    default is 0

    -
  • -
-
-
-

The nice priority is actually used for user programs.

-
-
- - - - - -
- - -Priority is all about managing processor time -
-
-
-
-
nice  run a program with modified scheduling priority
-chrt  allows to set your scheduling policy as well as priority.
-
-
-
-
-
-

5. Scheduler

-
-
-
- -
-
-
The scheduler is the Linux kernel part that decides which runnable process will be executed by the CPU next.
-
-
-
-

It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

-
-
-
-
- - - - - -
- - -
-

The scheduler makes it possible to execute multiple programs at the same time, thus sharing the CPU with users of varying needs.

-
-
-
    -
  • -

    Minimizing response time

    -
  • -
  • -

    Maximizing overall CPU utilization

    -
  • -
-
-
-
-
- - - - - -
- - -Since Linux 2.6.23, the default scheduler is CFS, the "Completely Fair Scheduler". The - CFS scheduler replaced the earlier "O(1)" scheduler. [5] [6] -
-
-
-
-
-

6. Context switching

-
-
-

Context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point. -This allows multiple processes to share a single central processing unit (CPU), and is an essential feature of a multitasking operating system.

-
-
-

In the Linux kernel, context switching involves

-
-
-
    -
  • -

    switching registers

    -
  • -
  • -

    stack pointer

    -
  • -
  • -

    program counter

    -
  • -
  • -

    flushing the translation lookaside buffer (TLB)

    -
  • -
  • -

    and loading the page table of the next process to run (unless the old process shares the memory with the new).

    -
  • -
-
-
-
-
-

7. Interrupts

-
-
-

An interrupt is an event that alters the normal execution flow of a program and can be generated by hardware devices or even by the CPU itself.

-
-
-

Interrupts can be grouped into two categories based on the source of the interrupt:

-
-
-
    -
  • -

    synchronous, generated by executing an instruction

    -
  • -
  • -

    asynchronous, generated by an external event

    -
    -
      -
    • -

      For example a network card generates an interrupts to signal that a packet has arrived.

      -
    • -
    -
    -
  • -
-
-
-
-
Information related to hard interrupts at /proc/interrupts
-
-
-
-
-
-
-
-
-1. http://www.it.uu.se/education/course/homepage/os/vt18/images/module-2/fork-exec-exit-wait.png -
-
-2. https://commons.wikimedia.org/w/index.php?curid=2233446 -
-
-3. https://gabrieletolomei.files.wordpress.com/2013/10/program_in_memory2.png?w=960 -
-
-4. By ScotXW - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=47075153 -
-
-5. https://en.wikipedia.org/wiki/Completely_Fair_Scheduler -
-
-6. https://www.kernel.org/doc/html/latest/scheduler/index.html -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/mmdy6eql0fp.html b/src-local/LabLearningObject-hybrid-tmp/mmdy6eql0fp.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/mmdy6eql0fp.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/mmpu9tvtxs.html b/src-local/LabLearningObject-hybrid-tmp/mmpu9tvtxs.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/mmpu9tvtxs.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/mqduv4n9boj.html b/src-local/LabLearningObject-hybrid-tmp/mqduv4n9boj.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/mqduv4n9boj.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/mvslupi4n8.html b/src-local/LabLearningObject-hybrid-tmp/mvslupi4n8.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/mvslupi4n8.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/mxpd3g8zwal.html b/src-local/LabLearningObject-hybrid-tmp/mxpd3g8zwal.html deleted file mode 100644 index 9140409..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/mxpd3g8zwal.html +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-
-
-
-
Life cycle of a process
-
-
- -
-

fork() is the the system call that the parent process uses to "divide" itself ("fork") into two identical processes.

-
-
-
    -
  • -

    After calling fork(), the created child process is an exact copy of the parent except for the return value of the fork() call.

    -
    -
      -
    • -

      This includes open files, register state, and all memory allocations, which includes the program’s executable code. In some cases the two continue to run the same binary,

      -
    • -
    -
    -
  • -
  • -

    the child switches to running another binary executable using the exec() system call.

    -
  • -
-
-
-
-
-
-
-
-
-

1. Life cycle of a process

-
-
-
    -
  • -

    When a process forks, a complete copy of the executing program is made into the new process.

    -
    -
      -
    • -

      This new process is a child of the parent process, and has a new process identifier (PID).

      -
    • -
    -
    -
  • -
  • -

    The fork() function returns the child’s PID to the parent process.

    -
    -
      -
    • -

      The fork() function returns 0 to the child process.

      -
    • -
    • -

      This enables the two identical processes to distinguish one another.

      -
    • -
    -
    -
  • -
  • -

    The parent process can either continue execution or wait for the child process to complete.

    -
  • -
  • -

    The child, after discovering that it is the child, replaces itself completely with another program, so that the code and address space of the original program are lost.

    -
  • -
  • -

    If the parent chooses to wait for the child to die, then the parent will receive the exit code of the program that the child executed.

    -
  • -
  • -

    To prevent the child becoming a zombie the parent should call wait on its children, either periodically or upon receiving the SIGCHLD signal, which indicates a child process has terminated.

    -
  • -
  • -

    One can also asynchronously wait on their children to finish, by using a signal handler for SIGCHLD, if they need to ensure everything is cleaned up.

    -
  • -
-
-
- - - - - -
- - -
-
    -
  • -

    When the child process calls exec(), all data in the original program is lost, and it is replaced with a running copy of the new program.

    -
    -
      -
    • -

      This is known as overlaying.

      -
    • -
    -
    -
  • -
  • -

    Although all data are replaced, the file descriptors that were open in the parent are closed only if the program has explicitly marked them close-on-exec.

    -
  • -
  • -

    This allows for the common practice of the parent creating a pipe prior to calling fork() and using it to communicate with the executed program.

    -
  • -
-
-
-
-
-

1.1. copy-on-write

-
-
-
All processes are sharing the same set of pages and each one gets its own private copy when it wants to modify a page.
-
-
-
-

In such cases, a technique called copy-on-write (COW) is used.

-
-
-

With this technique, when a fork occurs, the parent process’s pages are not copied for the child process.

-
-
-

Instead, the pages are shared between the child and the parent process.

-
-
-

Whenever a process (parent or child) modifies a page, a separate copy of that particular page alone is made for that process (parent or child) which performed the modification.

-
-
-

This process will then use the newly copied page rather than the shared one in all future references. -The other process (the one which did not modify the shared page) continues to use the original copy of the page (which is now no longer shared). This technique is called copy-on-write since the page is copied when some process writes to it.

-
-
- - - - - -
- - -
-

copy-on-write is lazy copying, child process copy the page when try to write it.

-
-
-

So basically, after a fork, almost child’s memory is shared with parent.

-
-
-

Before any of the processes made, every child process still have some private memory, modified from parent’s or new allocating.

-
-
-

That means even without any action the forked child process has some private memory.

-
-
-

We can verify it with

-
-
-
-
cat /proc/PID/smaps
-or
-pmap  PID
-
-
-
-
-
- - - - - -
- - -
-

This operation avoids unnecessary overhead because copying an entire address space is a very slow and inefficient operation which uses a lot of processor time and resources.

-
-
-
-
-
-

1.2. Zombie processes

-
-
-
A child process always first becomes a zombie before being removed from the resource table.
-
-
-
-

When a process ends via exit, all of the memory and resources associated with it are deallocated so they can be used by other processes.

-
-
-

The process’s entry in the process table remains.

-
-
-

The parent can read the child’s exit status by executing the wait system call, whereupon the zombie is removed.

-
-
-

The wait call may be executed in sequential code, but it is commonly executed in a handler for the SIGCHLD signal, which the parent receives whenever a child has died.

-
-
- - - - - -
- - -
-

In most cases, under normal system operation zombies are immediately waited on by their parent and then reaped by the system – processes that stay zombies for a long time are generally an error and cause a resource leak, but the only resource they occupy is the process table entry – process ID.

-
-
-
-
It is not possible to kill such a process with the kill command, because it is already considered dead.
-You can kill the parent process and then the zombie disappears as well.
-
-Zombies can be identified in the output from the Unix ps command by the presence of a "Z" in the "STAT" column
-
-
-
-
-
-
-

1.3. wait

-
-
-
The child process will not be completely removed until the parent process knows of the termination of its child process by the wait() system call.
-
-
-
-

A process (or task) may wait on another process to complete its execution.

-
-
-

The parent process issue a wait system call, which suspends the execution of the parent process while the child executes.

-
-
-

When the child process terminates, it returns an exit status to the operating system, which is then returned to the waiting parent process.

-
-
-

The parent process then resumes execution.

-
-
-
-

1.4. Orphan process

-
-

A child process whose parent process terminates before it does becomes an orphan process.

-
-
-

Such situations are typically handled with a special "root" (or "init") process, which is assigned as the new parent of a process when its parent process exits.

-
-
-

This special process detects when an orphan process terminates and then retrieves its exit status, allowing the system to deallocate the terminated child process.

-
-
-
-

1.5. Process States

-
-
-
ps aux
-
-
-
-

In the STAT column, you’ll see:

-
-
-
    -
  • -

    R: running or runnable, it is just waiting for the CPU to process it

    -
  • -
  • -

    S: Interruptible sleep, waiting for an event to complete, such as input from the terminal

    -
  • -
  • -

    D: Uninterruptible sleep, processes that cannot be killed or interrupted with a signal, usually to make them go away you have to reboot or fix the issue

    -
  • -
  • -

    Z: Zombie, we discussed in a previous lesson that zombies are terminated processes that are waiting to have their statuses collected

    -
  • -
  • -

    T: Stopped, a process that has been suspended/stopped

    -
  • -
-
-
-
-
-
-

2. Thread

-
-
-
-
A thread is an execution unit that has its own program counter, a stack and a set of registers that reside in a process
-
-
-
-

Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources.

-
-
-

The threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variables at any given time.

-
-
-
- -
-

Threads in the same process share:

-
-
-
    -
  • -

    Process instructions

    -
  • -
  • -

    open files, data

    -
  • -
  • -

    signals and signal handlers

    -
  • -
  • -

    current working directory

    -
  • -
  • -

    User and group id

    -
  • -
-
-
-
-
- - - - - -
- - -A thread is also called Light Weight Process (LWP). -
-
-
-

2.1. Implementations

-
-
    -
  • -

    LinuxThreads

    -
    -
      -
    • -

      The default thread implementation since Linux kernel 2.0 (introduced in 1996)

      -
    • -
    -
    -
  • -
  • -

    Native POSIX Thread Library (NPTL)

    -
    -
      -
    • -

      NPTL has been part of Red Hat Enterprise Linux since version 3, and in the Linux kernel since version 2.6. It is now a fully integrated part of the GNU C Library.

      -
    • -
    -
    -
  • -
  • -

    Next Generation POSIX Thread (NGPT)

    -
    -
      -
    • -

      A IBM developed version of POSIX thread library. The NGPT team collaborated closely with the NPTL team and combined the best features of both implementations into NPTL.

      -
    • -
    -
    -
  • -
-
-
-
-

2.2. Threads vs. processes pros and cons

-
-
    -
  • -

    processes are typically independent, while threads exist as subsets of a process

    -
  • -
  • -

    processes carry considerably more state information than threads, whereas multiple threads within a process share process state as well as memory and other resources

    -
  • -
  • -

    processes have separate address spaces, whereas threads share their address space

    -
  • -
  • -

    processes interact only through system-provided inter-process communication mechanisms

    -
  • -
  • -

    context switching between threads in the same process typically occurs faster than context switching between processes

    -
  • -
-
-
-

Advantages and disadvantages of threads vs processes include:

-
-
-
    -
  • -

    Lower resource consumption of threads: using threads, an application can operate using fewer resources than it would need when using multiple processes.

    -
  • -
  • -

    Simplified sharing and communication of threads: unlike processes, which require a message passing or shared memory mechanism to perform inter-process communication (IPC), threads can communicate through data, code and files they already share.

    -
  • -
-
-
- - - - - -
- - -Thread crashes a process: due to threads sharing the same address space, an illegal operation performed by a thread can crash the entire process; therefore, one misbehaving thread can disrupt the processing of all the other threads in the application. -
-
-
-

2.2.1. When should you prefer fork() over threading and vice-verse?

-
-

When you’re doing a far more complex task than just instantiating a worker, or you want the implicit security sandboxing of separate processes.

-
-
-
-

2.2.2. If I want to call an external application as a child, then should I use fork() or threads to do it?

-
-

If the child will do an identical task to the parent, with identical code, use fork. For smaller subtasks use threads.

-
-
-
-

2.2.3. it is bad thing to call a fork() inside a thread?

-
-

it’s computationally rather expensive to duplicate a process and a lot of subthreads.

-
-
-
-
-
-
-

3. Process Memory

-
-
-
-
A process uses its own memory area to perform work.
-
-
-
-
- -
-
    -
  • -

    Text Segment.

    -
    -
      -
    • -

      The Text segment (a.k.a the Instruction segment) contains the executable program code and constant data.

      -
    • -
    -
    -
  • -
  • -

    Data Segment

    -
    -
      -
    • -

      Heap

      -
      -
        -
      • -

        Heap is the segment from which the memory is provided. (e.g. malloc())

        -
      • -
      -
      -
    • -
    • -

      BSS:

      -
      -
        -
      • -

        The area where zero-initialized data is stored. All the global variable which are not initialized in the program are stored in the BSS segment.

        -
      • -
      -
      -
    • -
    • -

      Data:

      -
      -
        -
      • -

        The area where initialized data are stored.

        -
      • -
      -
      -
    • -
    -
    -
  • -
  • -

    Stack Segment

    -
    -
      -
    • -

      The stack segment is used by the process for the storage of automatic identifier, register variables, and function call information.

      -
    • -
    -
    -
  • -
-
-
-
-
-
what process is attached to a shared memory segment?
-
-
You can use:
-ipcs -mp to get the process ID
-and
-with the command grep [shared memory segment] /proc/*/maps
-
-
-
- - - - - -
- - -ipcs shows information on the inter-process communication facilities for which the calling process has read access. -By default it shows information about all three resources: shared memory segments, message queues, and semaphore arrays. -
-
-
-
-
-

4. Process priority (nice)

-
-
-

In Linux we can set guidelines for the CPU to follow when it is looking at all the tasks it has to do. -These guidelines are called niceness or nice value.

-
-
-

The "niceness" scale goes from

-
-
-
    -
  • -

    -20 (highest priority value)

    -
  • -
  • -

    19 (lowest priority value)

    -
  • -
  • -

    default is 0

    -
  • -
-
-
-

The nice priority is actually used for user programs.

-
-
- - - - - -
- - -Priority is all about managing processor time -
-
-
-
-
nice  run a program with modified scheduling priority
-chrt  allows to set your scheduling policy as well as priority.
-
-
-
-
-
-

5. Scheduler

-
-
-
- -
-
-
The scheduler is the Linux kernel part that decides which runnable process will be executed by the CPU next.
-
-
-
-

It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

-
-
-
-
- - - - - -
- - -
-

The scheduler makes it possible to execute multiple programs at the same time, thus sharing the CPU with users of varying needs.

-
-
-
    -
  • -

    Minimizing response time

    -
  • -
  • -

    Maximizing overall CPU utilization

    -
  • -
-
-
-
-
- - - - - -
- - -Since Linux 2.6.23, the default scheduler is CFS, the "Completely Fair Scheduler". The - CFS scheduler replaced the earlier "O(1)" scheduler. [5] [6] -
-
-
-
-
-

6. Context switching

-
-
-

Context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point. -This allows multiple processes to share a single central processing unit (CPU), and is an essential feature of a multitasking operating system.

-
-
-

In the Linux kernel, context switching involves

-
-
-
    -
  • -

    switching registers

    -
  • -
  • -

    stack pointer

    -
  • -
  • -

    program counter

    -
  • -
  • -

    flushing the translation lookaside buffer (TLB)

    -
  • -
  • -

    and loading the page table of the next process to run (unless the old process shares the memory with the new).

    -
  • -
-
-
-
-
-

7. Interrupts

-
-
-

An interrupt is an event that alters the normal execution flow of a program and can be generated by hardware devices or even by the CPU itself.

-
-
-

Interrupts can be grouped into two categories based on the source of the interrupt:

-
-
-
    -
  • -

    synchronous, generated by executing an instruction

    -
  • -
  • -

    asynchronous, generated by an external event

    -
    -
      -
    • -

      For example a network card generates an interrupts to signal that a packet has arrived.

      -
    • -
    -
    -
  • -
-
-
-
-
Information related to hard interrupts at /proc/interrupts
-
-
-
-
-
-
-
-
-1. http://www.it.uu.se/education/course/homepage/os/vt18/images/module-2/fork-exec-exit-wait.png -
-
-2. https://commons.wikimedia.org/w/index.php?curid=2233446 -
-
-3. https://gabrieletolomei.files.wordpress.com/2013/10/program_in_memory2.png?w=960 -
-
-4. By ScotXW - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=47075153 -
-
-5. https://en.wikipedia.org/wiki/Completely_Fair_Scheduler -
-
-6. https://www.kernel.org/doc/html/latest/scheduler/index.html -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/n2la4e2xulp.html b/src-local/LabLearningObject-hybrid-tmp/n2la4e2xulp.html deleted file mode 100644 index e3cf597..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/n2la4e2xulp.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/nd3ewfddvso.html b/src-local/LabLearningObject-hybrid-tmp/nd3ewfddvso.html deleted file mode 100644 index e3cf597..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/nd3ewfddvso.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/nkx54h9o4gi.html b/src-local/LabLearningObject-hybrid-tmp/nkx54h9o4gi.html deleted file mode 100644 index 9c97878..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/nkx54h9o4gi.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/nmc4bxl04tq.html b/src-local/LabLearningObject-hybrid-tmp/nmc4bxl04tq.html deleted file mode 100644 index fa85fef..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/nmc4bxl04tq.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Find and grep

-
-
-

1.1. find

-
-

The find tool, known from UNIX, is very powerful. This command not only allows you to search file names, it can also accept file size, date of last change and other file properties as criteria for a search.

-
-
-

The most common use is for finding file names:

-
-
- - - - - -
- - -find <path> -name <searchstring> -
-
-
-

This can be interpreted as "Look in all files and subdirectories contained in a given path, and print the names of the files containing the search string in their name" (not in their content).

-
-
-
-
 find /etc -name "*.conf"
-
-
-
-
-

1.2. grep

-
-

grep is used for filtering input lines and returning certain patterns to the output.

-
-
- - - - - -
- - -grep "string" path/to/file -
-
-
-
-
 grep "root" /etc/passwd
-
-
-
-
-

1.3. find and grep command together

-
-

find /etc -name "*.conf" -exec grep -Hns "conf" {} \;

-
-
-
Explanation
-
-
-H, --with-filename
-      Print the filename for each match
--n, --line-number
-      Prefix each line of output with the 1-based line number within its input file
--s, --no-messages
-      Suppress error messages about nonexistent or unreadable files.
-
-
-
- - - - - -
- - -This can be interpreted as
-- "Look for *.conf files and subdirectories contained in /etc, and if true exec grep -Hns conf in the given file" -
-
-
- - - - - -
- - -Very powerful in bash scripts -create a file test.sh -
-
-
-
bash script
-
-
#!/bin/bash
-STRING=$(find /etc -name "*.conf" -exec grep -Hns "conf" {} \;)
-echo $STRING
-
-
-
-

exec it

-
-
-
bash script
-
-
chmod 700 test.sh
-./test.sh
-
-
-
-


-
-

-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/nssqh89k4hs.html b/src-local/LabLearningObject-hybrid-tmp/nssqh89k4hs.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/nssqh89k4hs.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ny1rq14d6a.html b/src-local/LabLearningObject-hybrid-tmp/ny1rq14d6a.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ny1rq14d6a.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/nznnf5b0lcs.html b/src-local/LabLearningObject-hybrid-tmp/nznnf5b0lcs.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/nznnf5b0lcs.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/o1beq2qgezi.html b/src-local/LabLearningObject-hybrid-tmp/o1beq2qgezi.html deleted file mode 100644 index 8aa4b10..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/o1beq2qgezi.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
procfs
-
-

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, -providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

-
-
-

Typically

-
-
-
    -
  • -

    it is mapped to a mount point named /proc at boot time.

    -
  • -
  • -

    The proc file system acts as an interface to internal data structures in the kernel.

    -
  • -
  • -

    It can be used to obtain information about the system and to change certain kernel parameters at runtime (sysctl).

    -
  • -
-
-
-
-
-
-
-

1. The /proc Filesystem

-
-
- - - - - -
- - -The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls. -
-
-
-

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

-
-
-

The link ‘self’ points to the process reading the file system. Each process subdirectory has the entries listed in: ls /proc/<pid>

-
-
-
-
cat /proc/meminfo
-
-
-MemTotal:        8174328 kB
-MemFree:         6186516 kB
-MemAvailable:    7535332 kB
-Buffers:          146740 kB
-Cached:          1294156 kB
-SwapCached:            0 kB
-Active:           967184 kB
-Inactive:         606252 kB
-Active(anon):     135620 kB
-Inactive(anon):    85064 kB
-Active(file):     831564 kB
-Inactive(file):   521188 kB
-Unevictable:        3652 kB
-Mlocked:            3652 kB
-SwapTotal:             0 kB
-SwapFree:              0 kB
-Dirty:                68 kB
-Writeback:             0 kB
-AnonPages:        136188 kB
-Mapped:           113344 kB
-Shmem:             85724 kB
-Slab:             340236 kB
-SReclaimable:     302048 kB
-SUnreclaim:        38188 kB
-KernelStack:        3792 kB
-PageTables:         4888 kB
-NFS_Unstable:          0 kB
-Bounce:                0 kB
-WritebackTmp:          0 kB
-CommitLimit:     4087164 kB
-Committed_AS:     901432 kB
-VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB
-VmallocChunk:          0 kB
-HardwareCorrupted:     0 kB
-AnonHugePages:     51200 kB
-CmaTotal:              0 kB
-CmaFree:               0 kB
-
-...
-
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Main entries in /proc
FileContent

/proc/cmdline

– Kernel command line information.

/proc/console

– Information about current consoles including tty.

/proc/crypto

- a list of available cryptographic modules

/proc/devices

– Device drivers currently configured for the running kernel.

/proc/diskstats

- giving some information (including device numbers) for each of the logical disk devices

/proc/dma

– Info about current DMA channels.

/proc/fb

– Framebuffer devices.

/proc/filesystems

– Current filesystems supported by the kernel.

/proc/interrupts, /proc/iomem, /proc/ioports and the directory /proc/irq

- giving some self-explanatory details about the devices (physical or logical) using the various system resources

/proc/iomem

– Current system memory map for devices.

/proc/ioports

– Registered port regions for input output communication with device.

/proc/loadavg

– System load average.

/proc/locks

– Files currently locked by kernel.

/proc/meminfo

– Info about system memory (see above example).

/proc/misc

– Miscellaneous drivers registered for miscellaneous major device.

/proc/modules

- one of the most important files in /proc, containing a list of the kernel modules currently loaded . It gives some indication (not always entirely correct) of dependencies.

/proc/mounts

– List of all mounts in use by system.

/proc/mounts

- a symlink to self/mounts which contains a list of the currently mounted devices and their mount points (and which file system is in use and what mount options are in use).

/proc/net

- a directory containing useful information about the network stack, in particular /proc/net/nf_conntrack, which lists existing network connections (particularly useful for tracking routing when iptables FORWARD is used to redirect network connections)

/proc/partitions

– Detailed info about partitions available to the system.

/proc/pci

– Information about every PCI device.

/proc/stat

– Record or various statistics kept from last reboot.

/proc/swap

– Information about swap space.

/proc/scsi

- giving information about any devices connected via a SCSI or RAID controller

/proc/sysvipc

- containing memory-sharing and inter-process communication (IPC) information.

/proc/tty

- containing information about the current terminals; /proc/tty/driver looks to be[original research?] a list of the different types of tty available - each of which is a list of those of each type

/proc/uptime

– Uptime information (in seconds).

/proc/version

– Kernel version, gcc version, and Linux distribution installed.

-
-
-
-

2. cpu info

-
-
-
-
cat /proc/cpuinfo
-
-processor	: 0
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 2000.000
- cache size	: 1024 KB
- ...
- processor	: 1
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 800.000
- cache size	: 1024 KB
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/o9cosck9kbm.html b/src-local/LabLearningObject-hybrid-tmp/o9cosck9kbm.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/o9cosck9kbm.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/o9po9uvqi7h.html b/src-local/LabLearningObject-hybrid-tmp/o9po9uvqi7h.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/o9po9uvqi7h.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/oc5pj14rnh.html b/src-local/LabLearningObject-hybrid-tmp/oc5pj14rnh.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/oc5pj14rnh.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/oglq5azt71q.html b/src-local/LabLearningObject-hybrid-tmp/oglq5azt71q.html deleted file mode 100644 index fa85fef..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/oglq5azt71q.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Find and grep

-
-
-

1.1. find

-
-

The find tool, known from UNIX, is very powerful. This command not only allows you to search file names, it can also accept file size, date of last change and other file properties as criteria for a search.

-
-
-

The most common use is for finding file names:

-
-
- - - - - -
- - -find <path> -name <searchstring> -
-
-
-

This can be interpreted as "Look in all files and subdirectories contained in a given path, and print the names of the files containing the search string in their name" (not in their content).

-
-
-
-
 find /etc -name "*.conf"
-
-
-
-
-

1.2. grep

-
-

grep is used for filtering input lines and returning certain patterns to the output.

-
-
- - - - - -
- - -grep "string" path/to/file -
-
-
-
-
 grep "root" /etc/passwd
-
-
-
-
-

1.3. find and grep command together

-
-

find /etc -name "*.conf" -exec grep -Hns "conf" {} \;

-
-
-
Explanation
-
-
-H, --with-filename
-      Print the filename for each match
--n, --line-number
-      Prefix each line of output with the 1-based line number within its input file
--s, --no-messages
-      Suppress error messages about nonexistent or unreadable files.
-
-
-
- - - - - -
- - -This can be interpreted as
-- "Look for *.conf files and subdirectories contained in /etc, and if true exec grep -Hns conf in the given file" -
-
-
- - - - - -
- - -Very powerful in bash scripts -create a file test.sh -
-
-
-
bash script
-
-
#!/bin/bash
-STRING=$(find /etc -name "*.conf" -exec grep -Hns "conf" {} \;)
-echo $STRING
-
-
-
-

exec it

-
-
-
bash script
-
-
chmod 700 test.sh
-./test.sh
-
-
-
-


-
-

-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ot65qbmj0i.html b/src-local/LabLearningObject-hybrid-tmp/ot65qbmj0i.html deleted file mode 100644 index dff2c6a..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ot65qbmj0i.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ovxlgf9ujs8.html b/src-local/LabLearningObject-hybrid-tmp/ovxlgf9ujs8.html deleted file mode 100644 index 195282b..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ovxlgf9ujs8.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

-
-

An operating system kernel that allows multitasking needs processes to have certain states. Names for these states are not standardised, but they have similar functionality.

-
-
-
- -
-
    -
  • -

    the process is "created".

    -
  • -
  • -

    After that the process scheduler assigns it the "waiting" state.

    -
  • -
  • -

    While the process is "waiting", it waits for the scheduler to do a so-called context switch.

    -
  • -
  • -

    The context switch loads the process into the processor and changes the state to "running" while the previously "running" process is stored in a "waiting" state.

    -
  • -
  • -

    If a process in the "running" state needs to wait for a resource, it is assigned the "blocked" state.

    -
  • -
  • -

    The process state is changed back to "waiting" when the process no longer needs to wait (in a blocked state).

    -
  • -
  • -

    Once the process finishes execution, or is terminated by the operating system, it is no longer needed.

    -
  • -
  • -

    The process is removed instantly or is moved to the "terminated" state.

    -
  • -
  • -

    When removed, it just waits to be removed from main memory.

    -
  • -
-
-
-
-
-
-

2.3. Inter-process communication

-
-

When processes need to communicate with each other they must share parts of their address spaces or use other forms of inter-process communication (IPC).

-
-
-
    -
  • -

    For instance in a shell pipeline, the output of the first process need to pass to the second one.

    -
  • -
  • -

    another example is a task that can be decomposed into cooperating but partially independent processes which can run at once

    -
    -
      -
    • -

      (i.e., using concurrency, or true parallelism - the latter model is a particular case of concurrent execution and is feasible whenever enough CPU cores are available for all the processes that are ready to run).

      -
    • -
    -
    -
  • -
-
-
- - - - - -
- - -It is even possible for two or more processes to be running on different machines that may run different operating system (OS), therefore some mechanisms for communication and synchronization (called communications protocols for distributed computing) are needed (e.g., the Message Passing Interface, often simply called MPI). -
-
-
-

2.3.1. communication between processes

-
-

Processes can communicate with each other through:

-
-
-
    -
  • -

    Shared Memory

    -
  • -
  • -

    Message passing

    -
  • -
-
-
-
- - -
-
-
-

[1]

-
-
-
-
-
-
-
-
-
-1. https://www.geeksforgeeks.org/inter-process-communication-ipc/ -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/p3vxnmwgkb.html b/src-local/LabLearningObject-hybrid-tmp/p3vxnmwgkb.html deleted file mode 100644 index fa85fef..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/p3vxnmwgkb.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Find and grep

-
-
-

1.1. find

-
-

The find tool, known from UNIX, is very powerful. This command not only allows you to search file names, it can also accept file size, date of last change and other file properties as criteria for a search.

-
-
-

The most common use is for finding file names:

-
-
- - - - - -
- - -find <path> -name <searchstring> -
-
-
-

This can be interpreted as "Look in all files and subdirectories contained in a given path, and print the names of the files containing the search string in their name" (not in their content).

-
-
-
-
 find /etc -name "*.conf"
-
-
-
-
-

1.2. grep

-
-

grep is used for filtering input lines and returning certain patterns to the output.

-
-
- - - - - -
- - -grep "string" path/to/file -
-
-
-
-
 grep "root" /etc/passwd
-
-
-
-
-

1.3. find and grep command together

-
-

find /etc -name "*.conf" -exec grep -Hns "conf" {} \;

-
-
-
Explanation
-
-
-H, --with-filename
-      Print the filename for each match
--n, --line-number
-      Prefix each line of output with the 1-based line number within its input file
--s, --no-messages
-      Suppress error messages about nonexistent or unreadable files.
-
-
-
- - - - - -
- - -This can be interpreted as
-- "Look for *.conf files and subdirectories contained in /etc, and if true exec grep -Hns conf in the given file" -
-
-
- - - - - -
- - -Very powerful in bash scripts -create a file test.sh -
-
-
-
bash script
-
-
#!/bin/bash
-STRING=$(find /etc -name "*.conf" -exec grep -Hns "conf" {} \;)
-echo $STRING
-
-
-
-

exec it

-
-
-
bash script
-
-
chmod 700 test.sh
-./test.sh
-
-
-
-


-
-

-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/p6hoq10bc8.html b/src-local/LabLearningObject-hybrid-tmp/p6hoq10bc8.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/p6hoq10bc8.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/p7xhu2b442f.html b/src-local/LabLearningObject-hybrid-tmp/p7xhu2b442f.html deleted file mode 100644 index a5dae75..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/p7xhu2b442f.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/pd8fawxe1rb.html b/src-local/LabLearningObject-hybrid-tmp/pd8fawxe1rb.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/pd8fawxe1rb.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/pfq3jirfbvm.html b/src-local/LabLearningObject-hybrid-tmp/pfq3jirfbvm.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/pfq3jirfbvm.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/pi21kg3bkx.html b/src-local/LabLearningObject-hybrid-tmp/pi21kg3bkx.html deleted file mode 100644 index 212dfea..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/pi21kg3bkx.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Managing software

-
-
-

1.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

1.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

1.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

1.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

1.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

1.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

1.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/pp6wsi.html b/src-local/LabLearningObject-hybrid-tmp/pp6wsi.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/pp6wsi.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/pv1oyaxwx3n.html b/src-local/LabLearningObject-hybrid-tmp/pv1oyaxwx3n.html deleted file mode 100644 index 8aa4b10..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/pv1oyaxwx3n.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
procfs
-
-

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, -providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

-
-
-

Typically

-
-
-
    -
  • -

    it is mapped to a mount point named /proc at boot time.

    -
  • -
  • -

    The proc file system acts as an interface to internal data structures in the kernel.

    -
  • -
  • -

    It can be used to obtain information about the system and to change certain kernel parameters at runtime (sysctl).

    -
  • -
-
-
-
-
-
-
-

1. The /proc Filesystem

-
-
- - - - - -
- - -The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls. -
-
-
-

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

-
-
-

The link ‘self’ points to the process reading the file system. Each process subdirectory has the entries listed in: ls /proc/<pid>

-
-
-
-
cat /proc/meminfo
-
-
-MemTotal:        8174328 kB
-MemFree:         6186516 kB
-MemAvailable:    7535332 kB
-Buffers:          146740 kB
-Cached:          1294156 kB
-SwapCached:            0 kB
-Active:           967184 kB
-Inactive:         606252 kB
-Active(anon):     135620 kB
-Inactive(anon):    85064 kB
-Active(file):     831564 kB
-Inactive(file):   521188 kB
-Unevictable:        3652 kB
-Mlocked:            3652 kB
-SwapTotal:             0 kB
-SwapFree:              0 kB
-Dirty:                68 kB
-Writeback:             0 kB
-AnonPages:        136188 kB
-Mapped:           113344 kB
-Shmem:             85724 kB
-Slab:             340236 kB
-SReclaimable:     302048 kB
-SUnreclaim:        38188 kB
-KernelStack:        3792 kB
-PageTables:         4888 kB
-NFS_Unstable:          0 kB
-Bounce:                0 kB
-WritebackTmp:          0 kB
-CommitLimit:     4087164 kB
-Committed_AS:     901432 kB
-VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB
-VmallocChunk:          0 kB
-HardwareCorrupted:     0 kB
-AnonHugePages:     51200 kB
-CmaTotal:              0 kB
-CmaFree:               0 kB
-
-...
-
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Main entries in /proc
FileContent

/proc/cmdline

– Kernel command line information.

/proc/console

– Information about current consoles including tty.

/proc/crypto

- a list of available cryptographic modules

/proc/devices

– Device drivers currently configured for the running kernel.

/proc/diskstats

- giving some information (including device numbers) for each of the logical disk devices

/proc/dma

– Info about current DMA channels.

/proc/fb

– Framebuffer devices.

/proc/filesystems

– Current filesystems supported by the kernel.

/proc/interrupts, /proc/iomem, /proc/ioports and the directory /proc/irq

- giving some self-explanatory details about the devices (physical or logical) using the various system resources

/proc/iomem

– Current system memory map for devices.

/proc/ioports

– Registered port regions for input output communication with device.

/proc/loadavg

– System load average.

/proc/locks

– Files currently locked by kernel.

/proc/meminfo

– Info about system memory (see above example).

/proc/misc

– Miscellaneous drivers registered for miscellaneous major device.

/proc/modules

- one of the most important files in /proc, containing a list of the kernel modules currently loaded . It gives some indication (not always entirely correct) of dependencies.

/proc/mounts

– List of all mounts in use by system.

/proc/mounts

- a symlink to self/mounts which contains a list of the currently mounted devices and their mount points (and which file system is in use and what mount options are in use).

/proc/net

- a directory containing useful information about the network stack, in particular /proc/net/nf_conntrack, which lists existing network connections (particularly useful for tracking routing when iptables FORWARD is used to redirect network connections)

/proc/partitions

– Detailed info about partitions available to the system.

/proc/pci

– Information about every PCI device.

/proc/stat

– Record or various statistics kept from last reboot.

/proc/swap

– Information about swap space.

/proc/scsi

- giving information about any devices connected via a SCSI or RAID controller

/proc/sysvipc

- containing memory-sharing and inter-process communication (IPC) information.

/proc/tty

- containing information about the current terminals; /proc/tty/driver looks to be[original research?] a list of the different types of tty available - each of which is a list of those of each type

/proc/uptime

– Uptime information (in seconds).

/proc/version

– Kernel version, gcc version, and Linux distribution installed.

-
-
-
-

2. cpu info

-
-
-
-
cat /proc/cpuinfo
-
-processor	: 0
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 2000.000
- cache size	: 1024 KB
- ...
- processor	: 1
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 800.000
- cache size	: 1024 KB
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/q0fqvojd0s.html b/src-local/LabLearningObject-hybrid-tmp/q0fqvojd0s.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/q0fqvojd0s.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/q24kt.html b/src-local/LabLearningObject-hybrid-tmp/q24kt.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/q24kt.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/qbkn5hjp669.html b/src-local/LabLearningObject-hybrid-tmp/qbkn5hjp669.html deleted file mode 100644 index 212dfea..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/qbkn5hjp669.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Managing software

-
-
-

1.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

1.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

1.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

1.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

1.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

1.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

1.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/qgw58g2rluh.html b/src-local/LabLearningObject-hybrid-tmp/qgw58g2rluh.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/qgw58g2rluh.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/qhra43kqzuh.html b/src-local/LabLearningObject-hybrid-tmp/qhra43kqzuh.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/qhra43kqzuh.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/qjjaun7xfi.html b/src-local/LabLearningObject-hybrid-tmp/qjjaun7xfi.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/qjjaun7xfi.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/qm6rnzyx34.html b/src-local/LabLearningObject-hybrid-tmp/qm6rnzyx34.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/qm6rnzyx34.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/qs921xh55o.html b/src-local/LabLearningObject-hybrid-tmp/qs921xh55o.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/qs921xh55o.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/r109ayd06y.html b/src-local/LabLearningObject-hybrid-tmp/r109ayd06y.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/r109ayd06y.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/r7snzdnl2sk.html b/src-local/LabLearningObject-hybrid-tmp/r7snzdnl2sk.html deleted file mode 100644 index cfdc196..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/r7snzdnl2sk.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Find and grep

-
-
-

1.1. find

-
-

The find tool, known from UNIX, is very powerful. This command not only allows you to search file names, it can also accept file size, date of last change and other file properties as criteria for a search.

-
-
-

The most common use is for finding file names:

-
-
- - - - - -
- - -find <path> -name <searchstring> -
-
-
-

This can be interpreted as "Look in all files and subdirectories contained in a given path, and print the names of the files containing the search string in their name" (not in their content).

-
-
-
-
 find /etc -name "*.conf"
-
-
-
-
-

1.2. grep

-
-

grep is used for filtering input lines and returning certain patterns to the output.

-
-
- - - - - -
- - -grep "string" path/to/file -
-
-
-
-
 grep "root" /etc/passwd
-
-
-
-
-

1.3. find and grep command together

-
-

find /etc -name "*.conf" -exec grep -Hns "conf" {} \;

-
-
-
Explanation
-
-
-H, --with-filename
-      Print the filename for each match
--n, --line-number
-      Prefix each line of output with the 1-based line number within its input file
--s, --no-messages
-      Suppress error messages about nonexistent or unreadable files.
-
-
-
- - - - - -
- - -This can be interpreted as
-- "Look for *.conf files and subdirectories contained in /etc, and if true exec grep -Hns conf in the given file" -
-
-
- - - - - -
- - -Very powerful in bash scripts -create a file test.sh -.bash script -
-
-
-
-
#!/bin/bash
-STRING=$(find /etc -name "*.conf" -exec grep -Hns "conf" {} \;)
-echo $STRING
-
-
-
-

exec it -.bash script

-
-
-
-
chmod 700 test.sh
-./test.sh
-
-
-
-


-
-

-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/rbnhnl1mxve.html b/src-local/LabLearningObject-hybrid-tmp/rbnhnl1mxve.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/rbnhnl1mxve.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/rj8jjo0pfeb.html b/src-local/LabLearningObject-hybrid-tmp/rj8jjo0pfeb.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/rj8jjo0pfeb.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/rkk60agwfij.html b/src-local/LabLearningObject-hybrid-tmp/rkk60agwfij.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/rkk60agwfij.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/rkn3iv15dn.html b/src-local/LabLearningObject-hybrid-tmp/rkn3iv15dn.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/rkn3iv15dn.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/rkz3fq0kqga.html b/src-local/LabLearningObject-hybrid-tmp/rkz3fq0kqga.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/rkz3fq0kqga.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/rnaeiv6k8gi.html b/src-local/LabLearningObject-hybrid-tmp/rnaeiv6k8gi.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/rnaeiv6k8gi.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/rq1yvm97k6.html b/src-local/LabLearningObject-hybrid-tmp/rq1yvm97k6.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/rq1yvm97k6.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/rtc3ml1ld7c.html b/src-local/LabLearningObject-hybrid-tmp/rtc3ml1ld7c.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/rtc3ml1ld7c.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/rw1e3e.html b/src-local/LabLearningObject-hybrid-tmp/rw1e3e.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/rw1e3e.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/rzize9.html b/src-local/LabLearningObject-hybrid-tmp/rzize9.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/rzize9.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/s2jb9kqs86m.html b/src-local/LabLearningObject-hybrid-tmp/s2jb9kqs86m.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/s2jb9kqs86m.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/sgk08iiwq8k.html b/src-local/LabLearningObject-hybrid-tmp/sgk08iiwq8k.html deleted file mode 100644 index 55cb15f..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/sgk08iiwq8k.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-
-
procfs
-
-

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, -providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

-
-
-

Typically

-
-
-
    -
  • -

    it is mapped to a mount point named /proc at boot time.

    -
  • -
  • -

    The proc file system acts as an interface to internal data structures in the kernel.

    -
  • -
  • -

    It can be used to obtain information about the system and to change certain kernel parameters at runtime (sysctl).

    -
  • -
-
-
-
-
-
-
-

1. The /proc Filesystem

-
-
- - - - - -
- - -The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls. -
-
-
-

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

-
-
-

The link ‘self’ points to the process reading the file system. Each process subdirectory has the entries listed in: ls /proc/<pid>

-
-
-
-
cat /proc/meminfo
-
-
-MemTotal:        8174328 kB
-MemFree:         6186516 kB
-MemAvailable:    7535332 kB
-Buffers:          146740 kB
-Cached:          1294156 kB
-SwapCached:            0 kB
-Active:           967184 kB
-Inactive:         606252 kB
-Active(anon):     135620 kB
-Inactive(anon):    85064 kB
-Active(file):     831564 kB
-Inactive(file):   521188 kB
-Unevictable:        3652 kB
-Mlocked:            3652 kB
-SwapTotal:             0 kB
-SwapFree:              0 kB
-Dirty:                68 kB
-Writeback:             0 kB
-AnonPages:        136188 kB
-Mapped:           113344 kB
-Shmem:             85724 kB
-Slab:             340236 kB
-SReclaimable:     302048 kB
-SUnreclaim:        38188 kB
-KernelStack:        3792 kB
-PageTables:         4888 kB
-NFS_Unstable:          0 kB
-Bounce:                0 kB
-WritebackTmp:          0 kB
-CommitLimit:     4087164 kB
-Committed_AS:     901432 kB
-VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB
-VmallocChunk:          0 kB
-HardwareCorrupted:     0 kB
-AnonHugePages:     51200 kB
-CmaTotal:              0 kB
-CmaFree:               0 kB
-
-...
-
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Main entries in /proc
FileContent

/proc/cmdline

– Kernel command line information.

/proc/console

– Information about current consoles including tty.

/proc/crypto

- a list of available cryptographic modules

/proc/devices

– Device drivers currently configured for the running kernel.

/proc/diskstats

- giving some information (including device numbers) for each of the logical disk devices

/proc/dma

– Info about current DMA channels.

/proc/fb

– Framebuffer devices.

/proc/filesystems

– Current filesystems supported by the kernel.

/proc/interrupts, /proc/iomem, /proc/ioports and the directory /proc/irq

- giving some self-explanatory details about the devices (physical or logical) using the various system resources

/proc/iomem

– Current system memory map for devices.

/proc/ioports

– Registered port regions for input output communication with device.

/proc/loadavg

– System load average.

/proc/locks

– Files currently locked by kernel.

/proc/meminfo

– Info about system memory (see above example).

/proc/misc

– Miscellaneous drivers registered for miscellaneous major device.

/proc/modules

- one of the most important files in /proc, containing a list of the kernel modules currently loaded . It gives some indication (not always entirely correct) of dependencies.

/proc/mounts

– List of all mounts in use by system.

/proc/mounts

- a symlink to self/mounts which contains a list of the currently mounted devices and their mount points (and which file system is in use and what mount options are in use).

/proc/net

- a directory containing useful information about the network stack, in particular /proc/net/nf_conntrack, which lists existing network connections (particularly useful for tracking routing when iptables FORWARD is used to redirect network connections)

/proc/partitions

– Detailed info about partitions available to the system.

/proc/pci

– Information about every PCI device.

/proc/stat

– Record or various statistics kept from last reboot.

/proc/swap

– Information about swap space.

/proc/scsi

- giving information about any devices connected via a SCSI or RAID controller

/proc/sysvipc

- containing memory-sharing and inter-process communication (IPC) information.

/proc/tty

- containing information about the current terminals; /proc/tty/driver looks to be[original research?] a list of the different types of tty available - each of which is a list of those of each type

/proc/uptime

– Uptime information (in seconds).

/proc/version

– Kernel version, gcc version, and Linux distribution installed.

-
-
-
-

2. cpu info

-
-
-
-
cat /proc/cpuinfo
-
-processor	: 0
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 2000.000
- cache size	: 1024 KB
- ...
- processor	: 1
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 800.000
- cache size	: 1024 KB
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/sgqlgbcsr2.html b/src-local/LabLearningObject-hybrid-tmp/sgqlgbcsr2.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/sgqlgbcsr2.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/shmhpq9skks.html b/src-local/LabLearningObject-hybrid-tmp/shmhpq9skks.html deleted file mode 100644 index a5dae75..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/shmhpq9skks.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/sw161h.html b/src-local/LabLearningObject-hybrid-tmp/sw161h.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/sw161h.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/sxel8f.html b/src-local/LabLearningObject-hybrid-tmp/sxel8f.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/sxel8f.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/t7o40bsz5gj.html b/src-local/LabLearningObject-hybrid-tmp/t7o40bsz5gj.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/t7o40bsz5gj.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/tdrp8n2nvmk.html b/src-local/LabLearningObject-hybrid-tmp/tdrp8n2nvmk.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/tdrp8n2nvmk.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/tmpxn7p9wle.html b/src-local/LabLearningObject-hybrid-tmp/tmpxn7p9wle.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/tmpxn7p9wle.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/tu90u2ovrus.html b/src-local/LabLearningObject-hybrid-tmp/tu90u2ovrus.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/tu90u2ovrus.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/txju6vtvwgp.html b/src-local/LabLearningObject-hybrid-tmp/txju6vtvwgp.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/txju6vtvwgp.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/tz1gqo.html b/src-local/LabLearningObject-hybrid-tmp/tz1gqo.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/tz1gqo.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/u1mtre1ntye.html b/src-local/LabLearningObject-hybrid-tmp/u1mtre1ntye.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/u1mtre1ntye.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/u1zw5cgmeuj.html b/src-local/LabLearningObject-hybrid-tmp/u1zw5cgmeuj.html deleted file mode 100644 index f267580..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/u1zw5cgmeuj.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

-
-

An operating system kernel that allows multitasking needs processes to have certain states. Names for these states are not standardised, but they have similar functionality.

-
-
-
    -
  • -

    the process is "created".

    -
  • -
  • -

    After that the process scheduler assigns it the "waiting" state.

    -
  • -
  • -

    While the process is "waiting", it waits for the scheduler to do a so-called context switch.

    -
  • -
  • -

    The context switch loads the process into the processor and changes the state to "running" while the previously "running" process is stored in a "waiting" state.

    -
  • -
  • -

    If a process in the "running" state needs to wait for a resource, it is assigned the "blocked" state.

    -
  • -
  • -

    The process state is changed back to "waiting" when the process no longer needs to wait (in a blocked state).

    -
  • -
  • -

    Once the process finishes execution, or is terminated by the operating system, it is no longer needed.

    -
  • -
  • -

    The process is removed instantly or is moved to the "terminated" state.

    -
  • -
  • -

    When removed, it just waits to be removed from main memory.

    -
  • -
-
-
-
-

2.3. Inter-process communication

-
-

When processes need to communicate with each other they must share parts of their address spaces or use other forms of inter-process communication (IPC).

-
-
-
    -
  • -

    For instance in a shell pipeline, the output of the first process need to pass to the second one.

    -
  • -
  • -

    another example is a task that can be decomposed into cooperating but partially independent processes which can run at once

    -
    -
      -
    • -

      (i.e., using concurrency, or true parallelism - the latter model is a particular case of concurrent execution and is feasible whenever enough CPU cores are available for all the processes that are ready to run).

      -
    • -
    -
    -
  • -
-
-
- - - - - -
- - -It is even possible for two or more processes to be running on different machines that may run different operating system (OS), therefore some mechanisms for communication and synchronization (called communications protocols for distributed computing) are needed (e.g., the Message Passing Interface, often simply called MPI). -
-
-
-

2.3.1. communication between processes

-
-

Processes can communicate with each other through:

-
-
-
    -
  • -

    Shared Memory

    -
  • -
  • -

    Message passing

    -
  • -
-
-
-

[1]

-
-
-
-
-
-
-
-
-
-1. https://www.geeksforgeeks.org/inter-process-communication-ipc/ -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ubii0j.html b/src-local/LabLearningObject-hybrid-tmp/ubii0j.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ubii0j.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/uq5kqsx593.html b/src-local/LabLearningObject-hybrid-tmp/uq5kqsx593.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/uq5kqsx593.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/urn2fp1rqi.html b/src-local/LabLearningObject-hybrid-tmp/urn2fp1rqi.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/urn2fp1rqi.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/uxdsu1jknp.html b/src-local/LabLearningObject-hybrid-tmp/uxdsu1jknp.html deleted file mode 100644 index a5dae75..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/uxdsu1jknp.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/uzbzac8vdcd.html b/src-local/LabLearningObject-hybrid-tmp/uzbzac8vdcd.html deleted file mode 100644 index 342b074..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/uzbzac8vdcd.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Exercise

-
- -
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/v9bsnn2l5g.html b/src-local/LabLearningObject-hybrid-tmp/v9bsnn2l5g.html deleted file mode 100644 index e3cf597..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/v9bsnn2l5g.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/v9zqixm9u8e.html b/src-local/LabLearningObject-hybrid-tmp/v9zqixm9u8e.html deleted file mode 100644 index 9c97878..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/v9zqixm9u8e.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/vczprw5il5j.html b/src-local/LabLearningObject-hybrid-tmp/vczprw5il5j.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/vczprw5il5j.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/vefhb2nb9db.html b/src-local/LabLearningObject-hybrid-tmp/vefhb2nb9db.html deleted file mode 100644 index 195282b..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/vefhb2nb9db.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

-
-

An operating system kernel that allows multitasking needs processes to have certain states. Names for these states are not standardised, but they have similar functionality.

-
-
-
- -
-
    -
  • -

    the process is "created".

    -
  • -
  • -

    After that the process scheduler assigns it the "waiting" state.

    -
  • -
  • -

    While the process is "waiting", it waits for the scheduler to do a so-called context switch.

    -
  • -
  • -

    The context switch loads the process into the processor and changes the state to "running" while the previously "running" process is stored in a "waiting" state.

    -
  • -
  • -

    If a process in the "running" state needs to wait for a resource, it is assigned the "blocked" state.

    -
  • -
  • -

    The process state is changed back to "waiting" when the process no longer needs to wait (in a blocked state).

    -
  • -
  • -

    Once the process finishes execution, or is terminated by the operating system, it is no longer needed.

    -
  • -
  • -

    The process is removed instantly or is moved to the "terminated" state.

    -
  • -
  • -

    When removed, it just waits to be removed from main memory.

    -
  • -
-
-
-
-
-
-

2.3. Inter-process communication

-
-

When processes need to communicate with each other they must share parts of their address spaces or use other forms of inter-process communication (IPC).

-
-
-
    -
  • -

    For instance in a shell pipeline, the output of the first process need to pass to the second one.

    -
  • -
  • -

    another example is a task that can be decomposed into cooperating but partially independent processes which can run at once

    -
    -
      -
    • -

      (i.e., using concurrency, or true parallelism - the latter model is a particular case of concurrent execution and is feasible whenever enough CPU cores are available for all the processes that are ready to run).

      -
    • -
    -
    -
  • -
-
-
- - - - - -
- - -It is even possible for two or more processes to be running on different machines that may run different operating system (OS), therefore some mechanisms for communication and synchronization (called communications protocols for distributed computing) are needed (e.g., the Message Passing Interface, often simply called MPI). -
-
-
-

2.3.1. communication between processes

-
-

Processes can communicate with each other through:

-
-
-
    -
  • -

    Shared Memory

    -
  • -
  • -

    Message passing

    -
  • -
-
-
-
- - -
-
-
-

[1]

-
-
-
-
-
-
-
-
-
-1. https://www.geeksforgeeks.org/inter-process-communication-ipc/ -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/vfcy9cux28.html b/src-local/LabLearningObject-hybrid-tmp/vfcy9cux28.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/vfcy9cux28.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/vj8hf9t01th.html b/src-local/LabLearningObject-hybrid-tmp/vj8hf9t01th.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/vj8hf9t01th.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/vsl0a.html b/src-local/LabLearningObject-hybrid-tmp/vsl0a.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/vsl0a.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/vuuuoa6zdn.html b/src-local/LabLearningObject-hybrid-tmp/vuuuoa6zdn.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/vuuuoa6zdn.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/vuwtrw3lcv.html b/src-local/LabLearningObject-hybrid-tmp/vuwtrw3lcv.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/vuwtrw3lcv.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/vv4vzm.html b/src-local/LabLearningObject-hybrid-tmp/vv4vzm.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/vv4vzm.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/vzck8knqujg.html b/src-local/LabLearningObject-hybrid-tmp/vzck8knqujg.html deleted file mode 100644 index 55cb15f..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/vzck8knqujg.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-
-
procfs
-
-

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, -providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

-
-
-

Typically

-
-
-
    -
  • -

    it is mapped to a mount point named /proc at boot time.

    -
  • -
  • -

    The proc file system acts as an interface to internal data structures in the kernel.

    -
  • -
  • -

    It can be used to obtain information about the system and to change certain kernel parameters at runtime (sysctl).

    -
  • -
-
-
-
-
-
-
-

1. The /proc Filesystem

-
-
- - - - - -
- - -The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls. -
-
-
-

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

-
-
-

The link ‘self’ points to the process reading the file system. Each process subdirectory has the entries listed in: ls /proc/<pid>

-
-
-
-
cat /proc/meminfo
-
-
-MemTotal:        8174328 kB
-MemFree:         6186516 kB
-MemAvailable:    7535332 kB
-Buffers:          146740 kB
-Cached:          1294156 kB
-SwapCached:            0 kB
-Active:           967184 kB
-Inactive:         606252 kB
-Active(anon):     135620 kB
-Inactive(anon):    85064 kB
-Active(file):     831564 kB
-Inactive(file):   521188 kB
-Unevictable:        3652 kB
-Mlocked:            3652 kB
-SwapTotal:             0 kB
-SwapFree:              0 kB
-Dirty:                68 kB
-Writeback:             0 kB
-AnonPages:        136188 kB
-Mapped:           113344 kB
-Shmem:             85724 kB
-Slab:             340236 kB
-SReclaimable:     302048 kB
-SUnreclaim:        38188 kB
-KernelStack:        3792 kB
-PageTables:         4888 kB
-NFS_Unstable:          0 kB
-Bounce:                0 kB
-WritebackTmp:          0 kB
-CommitLimit:     4087164 kB
-Committed_AS:     901432 kB
-VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB
-VmallocChunk:          0 kB
-HardwareCorrupted:     0 kB
-AnonHugePages:     51200 kB
-CmaTotal:              0 kB
-CmaFree:               0 kB
-
-...
-
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Main entries in /proc
FileContent

/proc/cmdline

– Kernel command line information.

/proc/console

– Information about current consoles including tty.

/proc/crypto

- a list of available cryptographic modules

/proc/devices

– Device drivers currently configured for the running kernel.

/proc/diskstats

- giving some information (including device numbers) for each of the logical disk devices

/proc/dma

– Info about current DMA channels.

/proc/fb

– Framebuffer devices.

/proc/filesystems

– Current filesystems supported by the kernel.

/proc/interrupts, /proc/iomem, /proc/ioports and the directory /proc/irq

- giving some self-explanatory details about the devices (physical or logical) using the various system resources

/proc/iomem

– Current system memory map for devices.

/proc/ioports

– Registered port regions for input output communication with device.

/proc/loadavg

– System load average.

/proc/locks

– Files currently locked by kernel.

/proc/meminfo

– Info about system memory (see above example).

/proc/misc

– Miscellaneous drivers registered for miscellaneous major device.

/proc/modules

- one of the most important files in /proc, containing a list of the kernel modules currently loaded . It gives some indication (not always entirely correct) of dependencies.

/proc/mounts

– List of all mounts in use by system.

/proc/mounts

- a symlink to self/mounts which contains a list of the currently mounted devices and their mount points (and which file system is in use and what mount options are in use).

/proc/net

- a directory containing useful information about the network stack, in particular /proc/net/nf_conntrack, which lists existing network connections (particularly useful for tracking routing when iptables FORWARD is used to redirect network connections)

/proc/partitions

– Detailed info about partitions available to the system.

/proc/pci

– Information about every PCI device.

/proc/stat

– Record or various statistics kept from last reboot.

/proc/swap

– Information about swap space.

/proc/scsi

- giving information about any devices connected via a SCSI or RAID controller

/proc/sysvipc

- containing memory-sharing and inter-process communication (IPC) information.

/proc/tty

- containing information about the current terminals; /proc/tty/driver looks to be[original research?] a list of the different types of tty available - each of which is a list of those of each type

/proc/uptime

– Uptime information (in seconds).

/proc/version

– Kernel version, gcc version, and Linux distribution installed.

-
-
-
-

2. cpu info

-
-
-
-
cat /proc/cpuinfo
-
-processor	: 0
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 2000.000
- cache size	: 1024 KB
- ...
- processor	: 1
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 800.000
- cache size	: 1024 KB
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/w4132bieiel.html b/src-local/LabLearningObject-hybrid-tmp/w4132bieiel.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/w4132bieiel.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/w4j9b9g36sq.html b/src-local/LabLearningObject-hybrid-tmp/w4j9b9g36sq.html deleted file mode 100644 index 55cb15f..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/w4j9b9g36sq.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-
-
procfs
-
-

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, -providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

-
-
-

Typically

-
-
-
    -
  • -

    it is mapped to a mount point named /proc at boot time.

    -
  • -
  • -

    The proc file system acts as an interface to internal data structures in the kernel.

    -
  • -
  • -

    It can be used to obtain information about the system and to change certain kernel parameters at runtime (sysctl).

    -
  • -
-
-
-
-
-
-
-

1. The /proc Filesystem

-
-
- - - - - -
- - -The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls. -
-
-
-

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

-
-
-

The link ‘self’ points to the process reading the file system. Each process subdirectory has the entries listed in: ls /proc/<pid>

-
-
-
-
cat /proc/meminfo
-
-
-MemTotal:        8174328 kB
-MemFree:         6186516 kB
-MemAvailable:    7535332 kB
-Buffers:          146740 kB
-Cached:          1294156 kB
-SwapCached:            0 kB
-Active:           967184 kB
-Inactive:         606252 kB
-Active(anon):     135620 kB
-Inactive(anon):    85064 kB
-Active(file):     831564 kB
-Inactive(file):   521188 kB
-Unevictable:        3652 kB
-Mlocked:            3652 kB
-SwapTotal:             0 kB
-SwapFree:              0 kB
-Dirty:                68 kB
-Writeback:             0 kB
-AnonPages:        136188 kB
-Mapped:           113344 kB
-Shmem:             85724 kB
-Slab:             340236 kB
-SReclaimable:     302048 kB
-SUnreclaim:        38188 kB
-KernelStack:        3792 kB
-PageTables:         4888 kB
-NFS_Unstable:          0 kB
-Bounce:                0 kB
-WritebackTmp:          0 kB
-CommitLimit:     4087164 kB
-Committed_AS:     901432 kB
-VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB
-VmallocChunk:          0 kB
-HardwareCorrupted:     0 kB
-AnonHugePages:     51200 kB
-CmaTotal:              0 kB
-CmaFree:               0 kB
-
-...
-
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Main entries in /proc
FileContent

/proc/cmdline

– Kernel command line information.

/proc/console

– Information about current consoles including tty.

/proc/crypto

- a list of available cryptographic modules

/proc/devices

– Device drivers currently configured for the running kernel.

/proc/diskstats

- giving some information (including device numbers) for each of the logical disk devices

/proc/dma

– Info about current DMA channels.

/proc/fb

– Framebuffer devices.

/proc/filesystems

– Current filesystems supported by the kernel.

/proc/interrupts, /proc/iomem, /proc/ioports and the directory /proc/irq

- giving some self-explanatory details about the devices (physical or logical) using the various system resources

/proc/iomem

– Current system memory map for devices.

/proc/ioports

– Registered port regions for input output communication with device.

/proc/loadavg

– System load average.

/proc/locks

– Files currently locked by kernel.

/proc/meminfo

– Info about system memory (see above example).

/proc/misc

– Miscellaneous drivers registered for miscellaneous major device.

/proc/modules

- one of the most important files in /proc, containing a list of the kernel modules currently loaded . It gives some indication (not always entirely correct) of dependencies.

/proc/mounts

– List of all mounts in use by system.

/proc/mounts

- a symlink to self/mounts which contains a list of the currently mounted devices and their mount points (and which file system is in use and what mount options are in use).

/proc/net

- a directory containing useful information about the network stack, in particular /proc/net/nf_conntrack, which lists existing network connections (particularly useful for tracking routing when iptables FORWARD is used to redirect network connections)

/proc/partitions

– Detailed info about partitions available to the system.

/proc/pci

– Information about every PCI device.

/proc/stat

– Record or various statistics kept from last reboot.

/proc/swap

– Information about swap space.

/proc/scsi

- giving information about any devices connected via a SCSI or RAID controller

/proc/sysvipc

- containing memory-sharing and inter-process communication (IPC) information.

/proc/tty

- containing information about the current terminals; /proc/tty/driver looks to be[original research?] a list of the different types of tty available - each of which is a list of those of each type

/proc/uptime

– Uptime information (in seconds).

/proc/version

– Kernel version, gcc version, and Linux distribution installed.

-
-
-
-

2. cpu info

-
-
-
-
cat /proc/cpuinfo
-
-processor	: 0
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 2000.000
- cache size	: 1024 KB
- ...
- processor	: 1
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 800.000
- cache size	: 1024 KB
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/w6bhwnqh3vs.html b/src-local/LabLearningObject-hybrid-tmp/w6bhwnqh3vs.html deleted file mode 100644 index fa85fef..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/w6bhwnqh3vs.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Find and grep

-
-
-

1.1. find

-
-

The find tool, known from UNIX, is very powerful. This command not only allows you to search file names, it can also accept file size, date of last change and other file properties as criteria for a search.

-
-
-

The most common use is for finding file names:

-
-
- - - - - -
- - -find <path> -name <searchstring> -
-
-
-

This can be interpreted as "Look in all files and subdirectories contained in a given path, and print the names of the files containing the search string in their name" (not in their content).

-
-
-
-
 find /etc -name "*.conf"
-
-
-
-
-

1.2. grep

-
-

grep is used for filtering input lines and returning certain patterns to the output.

-
-
- - - - - -
- - -grep "string" path/to/file -
-
-
-
-
 grep "root" /etc/passwd
-
-
-
-
-

1.3. find and grep command together

-
-

find /etc -name "*.conf" -exec grep -Hns "conf" {} \;

-
-
-
Explanation
-
-
-H, --with-filename
-      Print the filename for each match
--n, --line-number
-      Prefix each line of output with the 1-based line number within its input file
--s, --no-messages
-      Suppress error messages about nonexistent or unreadable files.
-
-
-
- - - - - -
- - -This can be interpreted as
-- "Look for *.conf files and subdirectories contained in /etc, and if true exec grep -Hns conf in the given file" -
-
-
- - - - - -
- - -Very powerful in bash scripts -create a file test.sh -
-
-
-
bash script
-
-
#!/bin/bash
-STRING=$(find /etc -name "*.conf" -exec grep -Hns "conf" {} \;)
-echo $STRING
-
-
-
-

exec it

-
-
-
bash script
-
-
chmod 700 test.sh
-./test.sh
-
-
-
-


-
-

-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/wd4nwtuv3.html b/src-local/LabLearningObject-hybrid-tmp/wd4nwtuv3.html deleted file mode 100644 index 342b074..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/wd4nwtuv3.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Exercise

-
- -
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/wg7uo9f7xjk.html b/src-local/LabLearningObject-hybrid-tmp/wg7uo9f7xjk.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/wg7uo9f7xjk.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/wgwzgjd3xy.html b/src-local/LabLearningObject-hybrid-tmp/wgwzgjd3xy.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/wgwzgjd3xy.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/whw8pprt22r.html b/src-local/LabLearningObject-hybrid-tmp/whw8pprt22r.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/whw8pprt22r.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/wks9ty.html b/src-local/LabLearningObject-hybrid-tmp/wks9ty.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/wks9ty.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/wm95oilje4q.html b/src-local/LabLearningObject-hybrid-tmp/wm95oilje4q.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/wm95oilje4q.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/wpytgr4fnp9.html b/src-local/LabLearningObject-hybrid-tmp/wpytgr4fnp9.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/wpytgr4fnp9.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/wt6c2eyd4ui.html b/src-local/LabLearningObject-hybrid-tmp/wt6c2eyd4ui.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/wt6c2eyd4ui.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/x1acwzy4w0e.html b/src-local/LabLearningObject-hybrid-tmp/x1acwzy4w0e.html deleted file mode 100644 index 8aa4b10..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/x1acwzy4w0e.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
procfs
-
-

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, -providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

-
-
-

Typically

-
-
-
    -
  • -

    it is mapped to a mount point named /proc at boot time.

    -
  • -
  • -

    The proc file system acts as an interface to internal data structures in the kernel.

    -
  • -
  • -

    It can be used to obtain information about the system and to change certain kernel parameters at runtime (sysctl).

    -
  • -
-
-
-
-
-
-
-

1. The /proc Filesystem

-
-
- - - - - -
- - -The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls. -
-
-
-

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

-
-
-

The link ‘self’ points to the process reading the file system. Each process subdirectory has the entries listed in: ls /proc/<pid>

-
-
-
-
cat /proc/meminfo
-
-
-MemTotal:        8174328 kB
-MemFree:         6186516 kB
-MemAvailable:    7535332 kB
-Buffers:          146740 kB
-Cached:          1294156 kB
-SwapCached:            0 kB
-Active:           967184 kB
-Inactive:         606252 kB
-Active(anon):     135620 kB
-Inactive(anon):    85064 kB
-Active(file):     831564 kB
-Inactive(file):   521188 kB
-Unevictable:        3652 kB
-Mlocked:            3652 kB
-SwapTotal:             0 kB
-SwapFree:              0 kB
-Dirty:                68 kB
-Writeback:             0 kB
-AnonPages:        136188 kB
-Mapped:           113344 kB
-Shmem:             85724 kB
-Slab:             340236 kB
-SReclaimable:     302048 kB
-SUnreclaim:        38188 kB
-KernelStack:        3792 kB
-PageTables:         4888 kB
-NFS_Unstable:          0 kB
-Bounce:                0 kB
-WritebackTmp:          0 kB
-CommitLimit:     4087164 kB
-Committed_AS:     901432 kB
-VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB
-VmallocChunk:          0 kB
-HardwareCorrupted:     0 kB
-AnonHugePages:     51200 kB
-CmaTotal:              0 kB
-CmaFree:               0 kB
-
-...
-
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Main entries in /proc
FileContent

/proc/cmdline

– Kernel command line information.

/proc/console

– Information about current consoles including tty.

/proc/crypto

- a list of available cryptographic modules

/proc/devices

– Device drivers currently configured for the running kernel.

/proc/diskstats

- giving some information (including device numbers) for each of the logical disk devices

/proc/dma

– Info about current DMA channels.

/proc/fb

– Framebuffer devices.

/proc/filesystems

– Current filesystems supported by the kernel.

/proc/interrupts, /proc/iomem, /proc/ioports and the directory /proc/irq

- giving some self-explanatory details about the devices (physical or logical) using the various system resources

/proc/iomem

– Current system memory map for devices.

/proc/ioports

– Registered port regions for input output communication with device.

/proc/loadavg

– System load average.

/proc/locks

– Files currently locked by kernel.

/proc/meminfo

– Info about system memory (see above example).

/proc/misc

– Miscellaneous drivers registered for miscellaneous major device.

/proc/modules

- one of the most important files in /proc, containing a list of the kernel modules currently loaded . It gives some indication (not always entirely correct) of dependencies.

/proc/mounts

– List of all mounts in use by system.

/proc/mounts

- a symlink to self/mounts which contains a list of the currently mounted devices and their mount points (and which file system is in use and what mount options are in use).

/proc/net

- a directory containing useful information about the network stack, in particular /proc/net/nf_conntrack, which lists existing network connections (particularly useful for tracking routing when iptables FORWARD is used to redirect network connections)

/proc/partitions

– Detailed info about partitions available to the system.

/proc/pci

– Information about every PCI device.

/proc/stat

– Record or various statistics kept from last reboot.

/proc/swap

– Information about swap space.

/proc/scsi

- giving information about any devices connected via a SCSI or RAID controller

/proc/sysvipc

- containing memory-sharing and inter-process communication (IPC) information.

/proc/tty

- containing information about the current terminals; /proc/tty/driver looks to be[original research?] a list of the different types of tty available - each of which is a list of those of each type

/proc/uptime

– Uptime information (in seconds).

/proc/version

– Kernel version, gcc version, and Linux distribution installed.

-
-
-
-

2. cpu info

-
-
-
-
cat /proc/cpuinfo
-
-processor	: 0
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 2000.000
- cache size	: 1024 KB
- ...
- processor	: 1
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 800.000
- cache size	: 1024 KB
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/xgjis3.html b/src-local/LabLearningObject-hybrid-tmp/xgjis3.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/xgjis3.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/xjd2zhnjt5.html b/src-local/LabLearningObject-hybrid-tmp/xjd2zhnjt5.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/xjd2zhnjt5.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/xk733f4fewi.html b/src-local/LabLearningObject-hybrid-tmp/xk733f4fewi.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/xk733f4fewi.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/xkdsscpy0w.html b/src-local/LabLearningObject-hybrid-tmp/xkdsscpy0w.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/xkdsscpy0w.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/xkwf9wgcpdr.html b/src-local/LabLearningObject-hybrid-tmp/xkwf9wgcpdr.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/xkwf9wgcpdr.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/xv12i4fmvr9.html b/src-local/LabLearningObject-hybrid-tmp/xv12i4fmvr9.html deleted file mode 100644 index 195282b..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/xv12i4fmvr9.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

-
-

An operating system kernel that allows multitasking needs processes to have certain states. Names for these states are not standardised, but they have similar functionality.

-
-
-
- -
-
    -
  • -

    the process is "created".

    -
  • -
  • -

    After that the process scheduler assigns it the "waiting" state.

    -
  • -
  • -

    While the process is "waiting", it waits for the scheduler to do a so-called context switch.

    -
  • -
  • -

    The context switch loads the process into the processor and changes the state to "running" while the previously "running" process is stored in a "waiting" state.

    -
  • -
  • -

    If a process in the "running" state needs to wait for a resource, it is assigned the "blocked" state.

    -
  • -
  • -

    The process state is changed back to "waiting" when the process no longer needs to wait (in a blocked state).

    -
  • -
  • -

    Once the process finishes execution, or is terminated by the operating system, it is no longer needed.

    -
  • -
  • -

    The process is removed instantly or is moved to the "terminated" state.

    -
  • -
  • -

    When removed, it just waits to be removed from main memory.

    -
  • -
-
-
-
-
-
-

2.3. Inter-process communication

-
-

When processes need to communicate with each other they must share parts of their address spaces or use other forms of inter-process communication (IPC).

-
-
-
    -
  • -

    For instance in a shell pipeline, the output of the first process need to pass to the second one.

    -
  • -
  • -

    another example is a task that can be decomposed into cooperating but partially independent processes which can run at once

    -
    -
      -
    • -

      (i.e., using concurrency, or true parallelism - the latter model is a particular case of concurrent execution and is feasible whenever enough CPU cores are available for all the processes that are ready to run).

      -
    • -
    -
    -
  • -
-
-
- - - - - -
- - -It is even possible for two or more processes to be running on different machines that may run different operating system (OS), therefore some mechanisms for communication and synchronization (called communications protocols for distributed computing) are needed (e.g., the Message Passing Interface, often simply called MPI). -
-
-
-

2.3.1. communication between processes

-
-

Processes can communicate with each other through:

-
-
-
    -
  • -

    Shared Memory

    -
  • -
  • -

    Message passing

    -
  • -
-
-
-
- - -
-
-
-

[1]

-
-
-
-
-
-
-
-
-
-1. https://www.geeksforgeeks.org/inter-process-communication-ipc/ -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/xvndwaiaogc.html b/src-local/LabLearningObject-hybrid-tmp/xvndwaiaogc.html deleted file mode 100644 index a0007bf..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/xvndwaiaogc.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

-
-

An operating system kernel that allows multitasking needs processes to have certain states. Names for these states are not standardised, but they have similar functionality.

-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/yaagcheahm.html b/src-local/LabLearningObject-hybrid-tmp/yaagcheahm.html deleted file mode 100644 index 9140409..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/yaagcheahm.html +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-
-
-
-
Life cycle of a process
-
-
- -
-

fork() is the the system call that the parent process uses to "divide" itself ("fork") into two identical processes.

-
-
-
    -
  • -

    After calling fork(), the created child process is an exact copy of the parent except for the return value of the fork() call.

    -
    -
      -
    • -

      This includes open files, register state, and all memory allocations, which includes the program’s executable code. In some cases the two continue to run the same binary,

      -
    • -
    -
    -
  • -
  • -

    the child switches to running another binary executable using the exec() system call.

    -
  • -
-
-
-
-
-
-
-
-
-

1. Life cycle of a process

-
-
-
    -
  • -

    When a process forks, a complete copy of the executing program is made into the new process.

    -
    -
      -
    • -

      This new process is a child of the parent process, and has a new process identifier (PID).

      -
    • -
    -
    -
  • -
  • -

    The fork() function returns the child’s PID to the parent process.

    -
    -
      -
    • -

      The fork() function returns 0 to the child process.

      -
    • -
    • -

      This enables the two identical processes to distinguish one another.

      -
    • -
    -
    -
  • -
  • -

    The parent process can either continue execution or wait for the child process to complete.

    -
  • -
  • -

    The child, after discovering that it is the child, replaces itself completely with another program, so that the code and address space of the original program are lost.

    -
  • -
  • -

    If the parent chooses to wait for the child to die, then the parent will receive the exit code of the program that the child executed.

    -
  • -
  • -

    To prevent the child becoming a zombie the parent should call wait on its children, either periodically or upon receiving the SIGCHLD signal, which indicates a child process has terminated.

    -
  • -
  • -

    One can also asynchronously wait on their children to finish, by using a signal handler for SIGCHLD, if they need to ensure everything is cleaned up.

    -
  • -
-
-
- - - - - -
- - -
-
    -
  • -

    When the child process calls exec(), all data in the original program is lost, and it is replaced with a running copy of the new program.

    -
    -
      -
    • -

      This is known as overlaying.

      -
    • -
    -
    -
  • -
  • -

    Although all data are replaced, the file descriptors that were open in the parent are closed only if the program has explicitly marked them close-on-exec.

    -
  • -
  • -

    This allows for the common practice of the parent creating a pipe prior to calling fork() and using it to communicate with the executed program.

    -
  • -
-
-
-
-
-

1.1. copy-on-write

-
-
-
All processes are sharing the same set of pages and each one gets its own private copy when it wants to modify a page.
-
-
-
-

In such cases, a technique called copy-on-write (COW) is used.

-
-
-

With this technique, when a fork occurs, the parent process’s pages are not copied for the child process.

-
-
-

Instead, the pages are shared between the child and the parent process.

-
-
-

Whenever a process (parent or child) modifies a page, a separate copy of that particular page alone is made for that process (parent or child) which performed the modification.

-
-
-

This process will then use the newly copied page rather than the shared one in all future references. -The other process (the one which did not modify the shared page) continues to use the original copy of the page (which is now no longer shared). This technique is called copy-on-write since the page is copied when some process writes to it.

-
-
- - - - - -
- - -
-

copy-on-write is lazy copying, child process copy the page when try to write it.

-
-
-

So basically, after a fork, almost child’s memory is shared with parent.

-
-
-

Before any of the processes made, every child process still have some private memory, modified from parent’s or new allocating.

-
-
-

That means even without any action the forked child process has some private memory.

-
-
-

We can verify it with

-
-
-
-
cat /proc/PID/smaps
-or
-pmap  PID
-
-
-
-
-
- - - - - -
- - -
-

This operation avoids unnecessary overhead because copying an entire address space is a very slow and inefficient operation which uses a lot of processor time and resources.

-
-
-
-
-
-

1.2. Zombie processes

-
-
-
A child process always first becomes a zombie before being removed from the resource table.
-
-
-
-

When a process ends via exit, all of the memory and resources associated with it are deallocated so they can be used by other processes.

-
-
-

The process’s entry in the process table remains.

-
-
-

The parent can read the child’s exit status by executing the wait system call, whereupon the zombie is removed.

-
-
-

The wait call may be executed in sequential code, but it is commonly executed in a handler for the SIGCHLD signal, which the parent receives whenever a child has died.

-
-
- - - - - -
- - -
-

In most cases, under normal system operation zombies are immediately waited on by their parent and then reaped by the system – processes that stay zombies for a long time are generally an error and cause a resource leak, but the only resource they occupy is the process table entry – process ID.

-
-
-
-
It is not possible to kill such a process with the kill command, because it is already considered dead.
-You can kill the parent process and then the zombie disappears as well.
-
-Zombies can be identified in the output from the Unix ps command by the presence of a "Z" in the "STAT" column
-
-
-
-
-
-
-

1.3. wait

-
-
-
The child process will not be completely removed until the parent process knows of the termination of its child process by the wait() system call.
-
-
-
-

A process (or task) may wait on another process to complete its execution.

-
-
-

The parent process issue a wait system call, which suspends the execution of the parent process while the child executes.

-
-
-

When the child process terminates, it returns an exit status to the operating system, which is then returned to the waiting parent process.

-
-
-

The parent process then resumes execution.

-
-
-
-

1.4. Orphan process

-
-

A child process whose parent process terminates before it does becomes an orphan process.

-
-
-

Such situations are typically handled with a special "root" (or "init") process, which is assigned as the new parent of a process when its parent process exits.

-
-
-

This special process detects when an orphan process terminates and then retrieves its exit status, allowing the system to deallocate the terminated child process.

-
-
-
-

1.5. Process States

-
-
-
ps aux
-
-
-
-

In the STAT column, you’ll see:

-
-
-
    -
  • -

    R: running or runnable, it is just waiting for the CPU to process it

    -
  • -
  • -

    S: Interruptible sleep, waiting for an event to complete, such as input from the terminal

    -
  • -
  • -

    D: Uninterruptible sleep, processes that cannot be killed or interrupted with a signal, usually to make them go away you have to reboot or fix the issue

    -
  • -
  • -

    Z: Zombie, we discussed in a previous lesson that zombies are terminated processes that are waiting to have their statuses collected

    -
  • -
  • -

    T: Stopped, a process that has been suspended/stopped

    -
  • -
-
-
-
-
-
-

2. Thread

-
-
-
-
A thread is an execution unit that has its own program counter, a stack and a set of registers that reside in a process
-
-
-
-

Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources.

-
-
-

The threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variables at any given time.

-
-
-
- -
-

Threads in the same process share:

-
-
-
    -
  • -

    Process instructions

    -
  • -
  • -

    open files, data

    -
  • -
  • -

    signals and signal handlers

    -
  • -
  • -

    current working directory

    -
  • -
  • -

    User and group id

    -
  • -
-
-
-
-
- - - - - -
- - -A thread is also called Light Weight Process (LWP). -
-
-
-

2.1. Implementations

-
-
    -
  • -

    LinuxThreads

    -
    -
      -
    • -

      The default thread implementation since Linux kernel 2.0 (introduced in 1996)

      -
    • -
    -
    -
  • -
  • -

    Native POSIX Thread Library (NPTL)

    -
    -
      -
    • -

      NPTL has been part of Red Hat Enterprise Linux since version 3, and in the Linux kernel since version 2.6. It is now a fully integrated part of the GNU C Library.

      -
    • -
    -
    -
  • -
  • -

    Next Generation POSIX Thread (NGPT)

    -
    -
      -
    • -

      A IBM developed version of POSIX thread library. The NGPT team collaborated closely with the NPTL team and combined the best features of both implementations into NPTL.

      -
    • -
    -
    -
  • -
-
-
-
-

2.2. Threads vs. processes pros and cons

-
-
    -
  • -

    processes are typically independent, while threads exist as subsets of a process

    -
  • -
  • -

    processes carry considerably more state information than threads, whereas multiple threads within a process share process state as well as memory and other resources

    -
  • -
  • -

    processes have separate address spaces, whereas threads share their address space

    -
  • -
  • -

    processes interact only through system-provided inter-process communication mechanisms

    -
  • -
  • -

    context switching between threads in the same process typically occurs faster than context switching between processes

    -
  • -
-
-
-

Advantages and disadvantages of threads vs processes include:

-
-
-
    -
  • -

    Lower resource consumption of threads: using threads, an application can operate using fewer resources than it would need when using multiple processes.

    -
  • -
  • -

    Simplified sharing and communication of threads: unlike processes, which require a message passing or shared memory mechanism to perform inter-process communication (IPC), threads can communicate through data, code and files they already share.

    -
  • -
-
-
- - - - - -
- - -Thread crashes a process: due to threads sharing the same address space, an illegal operation performed by a thread can crash the entire process; therefore, one misbehaving thread can disrupt the processing of all the other threads in the application. -
-
-
-

2.2.1. When should you prefer fork() over threading and vice-verse?

-
-

When you’re doing a far more complex task than just instantiating a worker, or you want the implicit security sandboxing of separate processes.

-
-
-
-

2.2.2. If I want to call an external application as a child, then should I use fork() or threads to do it?

-
-

If the child will do an identical task to the parent, with identical code, use fork. For smaller subtasks use threads.

-
-
-
-

2.2.3. it is bad thing to call a fork() inside a thread?

-
-

it’s computationally rather expensive to duplicate a process and a lot of subthreads.

-
-
-
-
-
-
-

3. Process Memory

-
-
-
-
A process uses its own memory area to perform work.
-
-
-
-
- -
-
    -
  • -

    Text Segment.

    -
    -
      -
    • -

      The Text segment (a.k.a the Instruction segment) contains the executable program code and constant data.

      -
    • -
    -
    -
  • -
  • -

    Data Segment

    -
    -
      -
    • -

      Heap

      -
      -
        -
      • -

        Heap is the segment from which the memory is provided. (e.g. malloc())

        -
      • -
      -
      -
    • -
    • -

      BSS:

      -
      -
        -
      • -

        The area where zero-initialized data is stored. All the global variable which are not initialized in the program are stored in the BSS segment.

        -
      • -
      -
      -
    • -
    • -

      Data:

      -
      -
        -
      • -

        The area where initialized data are stored.

        -
      • -
      -
      -
    • -
    -
    -
  • -
  • -

    Stack Segment

    -
    -
      -
    • -

      The stack segment is used by the process for the storage of automatic identifier, register variables, and function call information.

      -
    • -
    -
    -
  • -
-
-
-
-
-
what process is attached to a shared memory segment?
-
-
You can use:
-ipcs -mp to get the process ID
-and
-with the command grep [shared memory segment] /proc/*/maps
-
-
-
- - - - - -
- - -ipcs shows information on the inter-process communication facilities for which the calling process has read access. -By default it shows information about all three resources: shared memory segments, message queues, and semaphore arrays. -
-
-
-
-
-

4. Process priority (nice)

-
-
-

In Linux we can set guidelines for the CPU to follow when it is looking at all the tasks it has to do. -These guidelines are called niceness or nice value.

-
-
-

The "niceness" scale goes from

-
-
-
    -
  • -

    -20 (highest priority value)

    -
  • -
  • -

    19 (lowest priority value)

    -
  • -
  • -

    default is 0

    -
  • -
-
-
-

The nice priority is actually used for user programs.

-
-
- - - - - -
- - -Priority is all about managing processor time -
-
-
-
-
nice  run a program with modified scheduling priority
-chrt  allows to set your scheduling policy as well as priority.
-
-
-
-
-
-

5. Scheduler

-
-
-
- -
-
-
The scheduler is the Linux kernel part that decides which runnable process will be executed by the CPU next.
-
-
-
-

It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

-
-
-
-
- - - - - -
- - -
-

The scheduler makes it possible to execute multiple programs at the same time, thus sharing the CPU with users of varying needs.

-
-
-
    -
  • -

    Minimizing response time

    -
  • -
  • -

    Maximizing overall CPU utilization

    -
  • -
-
-
-
-
- - - - - -
- - -Since Linux 2.6.23, the default scheduler is CFS, the "Completely Fair Scheduler". The - CFS scheduler replaced the earlier "O(1)" scheduler. [5] [6] -
-
-
-
-
-

6. Context switching

-
-
-

Context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point. -This allows multiple processes to share a single central processing unit (CPU), and is an essential feature of a multitasking operating system.

-
-
-

In the Linux kernel, context switching involves

-
-
-
    -
  • -

    switching registers

    -
  • -
  • -

    stack pointer

    -
  • -
  • -

    program counter

    -
  • -
  • -

    flushing the translation lookaside buffer (TLB)

    -
  • -
  • -

    and loading the page table of the next process to run (unless the old process shares the memory with the new).

    -
  • -
-
-
-
-
-

7. Interrupts

-
-
-

An interrupt is an event that alters the normal execution flow of a program and can be generated by hardware devices or even by the CPU itself.

-
-
-

Interrupts can be grouped into two categories based on the source of the interrupt:

-
-
-
    -
  • -

    synchronous, generated by executing an instruction

    -
  • -
  • -

    asynchronous, generated by an external event

    -
    -
      -
    • -

      For example a network card generates an interrupts to signal that a packet has arrived.

      -
    • -
    -
    -
  • -
-
-
-
-
Information related to hard interrupts at /proc/interrupts
-
-
-
-
-
-
-
-
-1. http://www.it.uu.se/education/course/homepage/os/vt18/images/module-2/fork-exec-exit-wait.png -
-
-2. https://commons.wikimedia.org/w/index.php?curid=2233446 -
-
-3. https://gabrieletolomei.files.wordpress.com/2013/10/program_in_memory2.png?w=960 -
-
-4. By ScotXW - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=47075153 -
-
-5. https://en.wikipedia.org/wiki/Completely_Fair_Scheduler -
-
-6. https://www.kernel.org/doc/html/latest/scheduler/index.html -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/yvhi6r.html b/src-local/LabLearningObject-hybrid-tmp/yvhi6r.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/yvhi6r.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/ywi2wq.html b/src-local/LabLearningObject-hybrid-tmp/ywi2wq.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/ywi2wq.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/z0nmr18r5d.html b/src-local/LabLearningObject-hybrid-tmp/z0nmr18r5d.html deleted file mode 100644 index 55cb15f..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/z0nmr18r5d.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-
-
procfs
-
-

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, -providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

-
-
-

Typically

-
-
-
    -
  • -

    it is mapped to a mount point named /proc at boot time.

    -
  • -
  • -

    The proc file system acts as an interface to internal data structures in the kernel.

    -
  • -
  • -

    It can be used to obtain information about the system and to change certain kernel parameters at runtime (sysctl).

    -
  • -
-
-
-
-
-
-
-

1. The /proc Filesystem

-
-
- - - - - -
- - -The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls. -
-
-
-

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

-
-
-

The link ‘self’ points to the process reading the file system. Each process subdirectory has the entries listed in: ls /proc/<pid>

-
-
-
-
cat /proc/meminfo
-
-
-MemTotal:        8174328 kB
-MemFree:         6186516 kB
-MemAvailable:    7535332 kB
-Buffers:          146740 kB
-Cached:          1294156 kB
-SwapCached:            0 kB
-Active:           967184 kB
-Inactive:         606252 kB
-Active(anon):     135620 kB
-Inactive(anon):    85064 kB
-Active(file):     831564 kB
-Inactive(file):   521188 kB
-Unevictable:        3652 kB
-Mlocked:            3652 kB
-SwapTotal:             0 kB
-SwapFree:              0 kB
-Dirty:                68 kB
-Writeback:             0 kB
-AnonPages:        136188 kB
-Mapped:           113344 kB
-Shmem:             85724 kB
-Slab:             340236 kB
-SReclaimable:     302048 kB
-SUnreclaim:        38188 kB
-KernelStack:        3792 kB
-PageTables:         4888 kB
-NFS_Unstable:          0 kB
-Bounce:                0 kB
-WritebackTmp:          0 kB
-CommitLimit:     4087164 kB
-Committed_AS:     901432 kB
-VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB
-VmallocChunk:          0 kB
-HardwareCorrupted:     0 kB
-AnonHugePages:     51200 kB
-CmaTotal:              0 kB
-CmaFree:               0 kB
-
-...
-
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Main entries in /proc
FileContent

/proc/cmdline

– Kernel command line information.

/proc/console

– Information about current consoles including tty.

/proc/crypto

- a list of available cryptographic modules

/proc/devices

– Device drivers currently configured for the running kernel.

/proc/diskstats

- giving some information (including device numbers) for each of the logical disk devices

/proc/dma

– Info about current DMA channels.

/proc/fb

– Framebuffer devices.

/proc/filesystems

– Current filesystems supported by the kernel.

/proc/interrupts, /proc/iomem, /proc/ioports and the directory /proc/irq

- giving some self-explanatory details about the devices (physical or logical) using the various system resources

/proc/iomem

– Current system memory map for devices.

/proc/ioports

– Registered port regions for input output communication with device.

/proc/loadavg

– System load average.

/proc/locks

– Files currently locked by kernel.

/proc/meminfo

– Info about system memory (see above example).

/proc/misc

– Miscellaneous drivers registered for miscellaneous major device.

/proc/modules

- one of the most important files in /proc, containing a list of the kernel modules currently loaded . It gives some indication (not always entirely correct) of dependencies.

/proc/mounts

– List of all mounts in use by system.

/proc/mounts

- a symlink to self/mounts which contains a list of the currently mounted devices and their mount points (and which file system is in use and what mount options are in use).

/proc/net

- a directory containing useful information about the network stack, in particular /proc/net/nf_conntrack, which lists existing network connections (particularly useful for tracking routing when iptables FORWARD is used to redirect network connections)

/proc/partitions

– Detailed info about partitions available to the system.

/proc/pci

– Information about every PCI device.

/proc/stat

– Record or various statistics kept from last reboot.

/proc/swap

– Information about swap space.

/proc/scsi

- giving information about any devices connected via a SCSI or RAID controller

/proc/sysvipc

- containing memory-sharing and inter-process communication (IPC) information.

/proc/tty

- containing information about the current terminals; /proc/tty/driver looks to be[original research?] a list of the different types of tty available - each of which is a list of those of each type

/proc/uptime

– Uptime information (in seconds).

/proc/version

– Kernel version, gcc version, and Linux distribution installed.

-
-
-
-

2. cpu info

-
-
-
-
cat /proc/cpuinfo
-
-processor	: 0
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 2000.000
- cache size	: 1024 KB
- ...
- processor	: 1
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 800.000
- cache size	: 1024 KB
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/z349lfetth.html b/src-local/LabLearningObject-hybrid-tmp/z349lfetth.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/z349lfetth.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/z3lhczzuex9.html b/src-local/LabLearningObject-hybrid-tmp/z3lhczzuex9.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/z3lhczzuex9.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/z8ei59vcmwb.html b/src-local/LabLearningObject-hybrid-tmp/z8ei59vcmwb.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/z8ei59vcmwb.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/za6tz5acu0g.html b/src-local/LabLearningObject-hybrid-tmp/za6tz5acu0g.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/za6tz5acu0g.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/zbkajy.html b/src-local/LabLearningObject-hybrid-tmp/zbkajy.html deleted file mode 100644 index a582ae8..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/zbkajy.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -works - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/zi7eib0zc9.html b/src-local/LabLearningObject-hybrid-tmp/zi7eib0zc9.html deleted file mode 100644 index 195282b..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/zi7eib0zc9.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-

1. process

-
-
-

An instance of a running program is called a process. -Every time you run a shell command, a program is run and a process is created for it.

-
-
-

In any modern operating system there can be more than one instance of a program loaded in memory at the same time.

-
-
-
-
-

2. Linux process management

-
-
-

Operating systems need some ways to create processes.

-
-
-
    -
  • -

    In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.

    -
  • -
  • -

    In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.

    -
  • -
-
-
- - - - - -
- - -
-

There are four principal events that cause a process to be created:

-
-
-
    -
  • -

    System initialization.

    -
  • -
  • -

    Execution of process creation system call by a running process.

    -
  • -
  • -

    A user request to create a new process.

    -
  • -
  • -

    Initiation of a batch job.

    -
  • -
-
-
-
-
-

Process creation in UNIX and Linux are done through fork() or clone() system calls.

-
-
-

There are several steps involved in process creation.

-
-
-
    -
  • -

    process scheduling,

    -
  • -
  • -

    interrupt handling,

    -
  • -
  • -

    signaling,

    -
  • -
  • -

    process prioritization,

    -
  • -
  • -

    process switching,

    -
  • -
  • -

    process state,

    -
  • -
  • -

    process memory

    -
  • -
-
-
-

2.1. Life cycle of a process

-
- - - - - -
- - -1→ creation 2→ execution 3→ termination 4→ removal -
-
-
-
-

2.2. process state

-
-

An operating system kernel that allows multitasking needs processes to have certain states. Names for these states are not standardised, but they have similar functionality.

-
-
-
- -
-
    -
  • -

    the process is "created".

    -
  • -
  • -

    After that the process scheduler assigns it the "waiting" state.

    -
  • -
  • -

    While the process is "waiting", it waits for the scheduler to do a so-called context switch.

    -
  • -
  • -

    The context switch loads the process into the processor and changes the state to "running" while the previously "running" process is stored in a "waiting" state.

    -
  • -
  • -

    If a process in the "running" state needs to wait for a resource, it is assigned the "blocked" state.

    -
  • -
  • -

    The process state is changed back to "waiting" when the process no longer needs to wait (in a blocked state).

    -
  • -
  • -

    Once the process finishes execution, or is terminated by the operating system, it is no longer needed.

    -
  • -
  • -

    The process is removed instantly or is moved to the "terminated" state.

    -
  • -
  • -

    When removed, it just waits to be removed from main memory.

    -
  • -
-
-
-
-
-
-

2.3. Inter-process communication

-
-

When processes need to communicate with each other they must share parts of their address spaces or use other forms of inter-process communication (IPC).

-
-
-
    -
  • -

    For instance in a shell pipeline, the output of the first process need to pass to the second one.

    -
  • -
  • -

    another example is a task that can be decomposed into cooperating but partially independent processes which can run at once

    -
    -
      -
    • -

      (i.e., using concurrency, or true parallelism - the latter model is a particular case of concurrent execution and is feasible whenever enough CPU cores are available for all the processes that are ready to run).

      -
    • -
    -
    -
  • -
-
-
- - - - - -
- - -It is even possible for two or more processes to be running on different machines that may run different operating system (OS), therefore some mechanisms for communication and synchronization (called communications protocols for distributed computing) are needed (e.g., the Message Passing Interface, often simply called MPI). -
-
-
-

2.3.1. communication between processes

-
-

Processes can communicate with each other through:

-
-
-
    -
  • -

    Shared Memory

    -
  • -
  • -

    Message passing

    -
  • -
-
-
-
- - -
-
-
-

[1]

-
-
-
-
-
-
-
-
-
-1. https://www.geeksforgeeks.org/inter-process-communication-ipc/ -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/zjlw4ravhl.html b/src-local/LabLearningObject-hybrid-tmp/zjlw4ravhl.html deleted file mode 100644 index 55cb15f..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/zjlw4ravhl.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-
-
procfs
-
-

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, -providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

-
-
-

Typically

-
-
-
    -
  • -

    it is mapped to a mount point named /proc at boot time.

    -
  • -
  • -

    The proc file system acts as an interface to internal data structures in the kernel.

    -
  • -
  • -

    It can be used to obtain information about the system and to change certain kernel parameters at runtime (sysctl).

    -
  • -
-
-
-
-
-
-
-

1. The /proc Filesystem

-
-
- - - - - -
- - -The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls. -
-
-
-

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

-
-
-

The link ‘self’ points to the process reading the file system. Each process subdirectory has the entries listed in: ls /proc/<pid>

-
-
-
-
cat /proc/meminfo
-
-
-MemTotal:        8174328 kB
-MemFree:         6186516 kB
-MemAvailable:    7535332 kB
-Buffers:          146740 kB
-Cached:          1294156 kB
-SwapCached:            0 kB
-Active:           967184 kB
-Inactive:         606252 kB
-Active(anon):     135620 kB
-Inactive(anon):    85064 kB
-Active(file):     831564 kB
-Inactive(file):   521188 kB
-Unevictable:        3652 kB
-Mlocked:            3652 kB
-SwapTotal:             0 kB
-SwapFree:              0 kB
-Dirty:                68 kB
-Writeback:             0 kB
-AnonPages:        136188 kB
-Mapped:           113344 kB
-Shmem:             85724 kB
-Slab:             340236 kB
-SReclaimable:     302048 kB
-SUnreclaim:        38188 kB
-KernelStack:        3792 kB
-PageTables:         4888 kB
-NFS_Unstable:          0 kB
-Bounce:                0 kB
-WritebackTmp:          0 kB
-CommitLimit:     4087164 kB
-Committed_AS:     901432 kB
-VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB
-VmallocChunk:          0 kB
-HardwareCorrupted:     0 kB
-AnonHugePages:     51200 kB
-CmaTotal:              0 kB
-CmaFree:               0 kB
-
-...
-
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Main entries in /proc
FileContent

/proc/cmdline

– Kernel command line information.

/proc/console

– Information about current consoles including tty.

/proc/crypto

- a list of available cryptographic modules

/proc/devices

– Device drivers currently configured for the running kernel.

/proc/diskstats

- giving some information (including device numbers) for each of the logical disk devices

/proc/dma

– Info about current DMA channels.

/proc/fb

– Framebuffer devices.

/proc/filesystems

– Current filesystems supported by the kernel.

/proc/interrupts, /proc/iomem, /proc/ioports and the directory /proc/irq

- giving some self-explanatory details about the devices (physical or logical) using the various system resources

/proc/iomem

– Current system memory map for devices.

/proc/ioports

– Registered port regions for input output communication with device.

/proc/loadavg

– System load average.

/proc/locks

– Files currently locked by kernel.

/proc/meminfo

– Info about system memory (see above example).

/proc/misc

– Miscellaneous drivers registered for miscellaneous major device.

/proc/modules

- one of the most important files in /proc, containing a list of the kernel modules currently loaded . It gives some indication (not always entirely correct) of dependencies.

/proc/mounts

– List of all mounts in use by system.

/proc/mounts

- a symlink to self/mounts which contains a list of the currently mounted devices and their mount points (and which file system is in use and what mount options are in use).

/proc/net

- a directory containing useful information about the network stack, in particular /proc/net/nf_conntrack, which lists existing network connections (particularly useful for tracking routing when iptables FORWARD is used to redirect network connections)

/proc/partitions

– Detailed info about partitions available to the system.

/proc/pci

– Information about every PCI device.

/proc/stat

– Record or various statistics kept from last reboot.

/proc/swap

– Information about swap space.

/proc/scsi

- giving information about any devices connected via a SCSI or RAID controller

/proc/sysvipc

- containing memory-sharing and inter-process communication (IPC) information.

/proc/tty

- containing information about the current terminals; /proc/tty/driver looks to be[original research?] a list of the different types of tty available - each of which is a list of those of each type

/proc/uptime

– Uptime information (in seconds).

/proc/version

– Kernel version, gcc version, and Linux distribution installed.

-
-
-
-

2. cpu info

-
-
-
-
cat /proc/cpuinfo
-
-processor	: 0
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 2000.000
- cache size	: 1024 KB
- ...
- processor	: 1
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 800.000
- cache size	: 1024 KB
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/zkgx8qgu7c.html b/src-local/LabLearningObject-hybrid-tmp/zkgx8qgu7c.html deleted file mode 100644 index 212dfea..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/zkgx8qgu7c.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
-

1. Managing software

-
-
-

1.1. APT

-
-

WHAT IS APT?

-
-
-

A packaging system simply provides programs and applications for installation.

-
-
-

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

-
-
-

1.1.1. Updating Package Database

-
-

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. -Without this the system won’t know if there are newer packages available or not.

-
-
-
-
apt-get update
-
-
-
-
-

1.1.2. Upgrading Package Database

-
-

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

-
-
-
-
sudo apt-get upgrade
-
-
-
-
-

1.1.3. SEARCH FOR PACKAGES WITH APT

-
-

To search for a package you can use the following command:

-
-
-
-
apt search apache2
-
-
-
-
-

1.1.4. INSTALLING NEW PACKAGES

-
-

If you are find the name of the package you want to install, you can install it by running this command:

-
-
-
-
apt install apache2 vlc
-
-
-
-
-

1.1.5. REMOVING INSTALLED PACKAGES

-
-

To uninstall a package from your system, you can use the following command:

-
-
-
-
apt remove vlc
-
-
-
- - - - - -
- - -This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command: -
-
-
-
-
apt purge vlc
-
-
-
-
-

1.1.6. clean up any unused libraries and packages

-
-
-
apt autoremove
-
-
-
-

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.

-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/zkx5juvdc3l.html b/src-local/LabLearningObject-hybrid-tmp/zkx5juvdc3l.html deleted file mode 100644 index 9140409..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/zkx5juvdc3l.html +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - - - - - -Linux process management ! - - - - - - -
-
-
-
-
-
Life cycle of a process
-
-
- -
-

fork() is the the system call that the parent process uses to "divide" itself ("fork") into two identical processes.

-
-
-
    -
  • -

    After calling fork(), the created child process is an exact copy of the parent except for the return value of the fork() call.

    -
    -
      -
    • -

      This includes open files, register state, and all memory allocations, which includes the program’s executable code. In some cases the two continue to run the same binary,

      -
    • -
    -
    -
  • -
  • -

    the child switches to running another binary executable using the exec() system call.

    -
  • -
-
-
-
-
-
-
-
-
-

1. Life cycle of a process

-
-
-
    -
  • -

    When a process forks, a complete copy of the executing program is made into the new process.

    -
    -
      -
    • -

      This new process is a child of the parent process, and has a new process identifier (PID).

      -
    • -
    -
    -
  • -
  • -

    The fork() function returns the child’s PID to the parent process.

    -
    -
      -
    • -

      The fork() function returns 0 to the child process.

      -
    • -
    • -

      This enables the two identical processes to distinguish one another.

      -
    • -
    -
    -
  • -
  • -

    The parent process can either continue execution or wait for the child process to complete.

    -
  • -
  • -

    The child, after discovering that it is the child, replaces itself completely with another program, so that the code and address space of the original program are lost.

    -
  • -
  • -

    If the parent chooses to wait for the child to die, then the parent will receive the exit code of the program that the child executed.

    -
  • -
  • -

    To prevent the child becoming a zombie the parent should call wait on its children, either periodically or upon receiving the SIGCHLD signal, which indicates a child process has terminated.

    -
  • -
  • -

    One can also asynchronously wait on their children to finish, by using a signal handler for SIGCHLD, if they need to ensure everything is cleaned up.

    -
  • -
-
-
- - - - - -
- - -
-
    -
  • -

    When the child process calls exec(), all data in the original program is lost, and it is replaced with a running copy of the new program.

    -
    -
      -
    • -

      This is known as overlaying.

      -
    • -
    -
    -
  • -
  • -

    Although all data are replaced, the file descriptors that were open in the parent are closed only if the program has explicitly marked them close-on-exec.

    -
  • -
  • -

    This allows for the common practice of the parent creating a pipe prior to calling fork() and using it to communicate with the executed program.

    -
  • -
-
-
-
-
-

1.1. copy-on-write

-
-
-
All processes are sharing the same set of pages and each one gets its own private copy when it wants to modify a page.
-
-
-
-

In such cases, a technique called copy-on-write (COW) is used.

-
-
-

With this technique, when a fork occurs, the parent process’s pages are not copied for the child process.

-
-
-

Instead, the pages are shared between the child and the parent process.

-
-
-

Whenever a process (parent or child) modifies a page, a separate copy of that particular page alone is made for that process (parent or child) which performed the modification.

-
-
-

This process will then use the newly copied page rather than the shared one in all future references. -The other process (the one which did not modify the shared page) continues to use the original copy of the page (which is now no longer shared). This technique is called copy-on-write since the page is copied when some process writes to it.

-
-
- - - - - -
- - -
-

copy-on-write is lazy copying, child process copy the page when try to write it.

-
-
-

So basically, after a fork, almost child’s memory is shared with parent.

-
-
-

Before any of the processes made, every child process still have some private memory, modified from parent’s or new allocating.

-
-
-

That means even without any action the forked child process has some private memory.

-
-
-

We can verify it with

-
-
-
-
cat /proc/PID/smaps
-or
-pmap  PID
-
-
-
-
-
- - - - - -
- - -
-

This operation avoids unnecessary overhead because copying an entire address space is a very slow and inefficient operation which uses a lot of processor time and resources.

-
-
-
-
-
-

1.2. Zombie processes

-
-
-
A child process always first becomes a zombie before being removed from the resource table.
-
-
-
-

When a process ends via exit, all of the memory and resources associated with it are deallocated so they can be used by other processes.

-
-
-

The process’s entry in the process table remains.

-
-
-

The parent can read the child’s exit status by executing the wait system call, whereupon the zombie is removed.

-
-
-

The wait call may be executed in sequential code, but it is commonly executed in a handler for the SIGCHLD signal, which the parent receives whenever a child has died.

-
-
- - - - - -
- - -
-

In most cases, under normal system operation zombies are immediately waited on by their parent and then reaped by the system – processes that stay zombies for a long time are generally an error and cause a resource leak, but the only resource they occupy is the process table entry – process ID.

-
-
-
-
It is not possible to kill such a process with the kill command, because it is already considered dead.
-You can kill the parent process and then the zombie disappears as well.
-
-Zombies can be identified in the output from the Unix ps command by the presence of a "Z" in the "STAT" column
-
-
-
-
-
-
-

1.3. wait

-
-
-
The child process will not be completely removed until the parent process knows of the termination of its child process by the wait() system call.
-
-
-
-

A process (or task) may wait on another process to complete its execution.

-
-
-

The parent process issue a wait system call, which suspends the execution of the parent process while the child executes.

-
-
-

When the child process terminates, it returns an exit status to the operating system, which is then returned to the waiting parent process.

-
-
-

The parent process then resumes execution.

-
-
-
-

1.4. Orphan process

-
-

A child process whose parent process terminates before it does becomes an orphan process.

-
-
-

Such situations are typically handled with a special "root" (or "init") process, which is assigned as the new parent of a process when its parent process exits.

-
-
-

This special process detects when an orphan process terminates and then retrieves its exit status, allowing the system to deallocate the terminated child process.

-
-
-
-

1.5. Process States

-
-
-
ps aux
-
-
-
-

In the STAT column, you’ll see:

-
-
-
    -
  • -

    R: running or runnable, it is just waiting for the CPU to process it

    -
  • -
  • -

    S: Interruptible sleep, waiting for an event to complete, such as input from the terminal

    -
  • -
  • -

    D: Uninterruptible sleep, processes that cannot be killed or interrupted with a signal, usually to make them go away you have to reboot or fix the issue

    -
  • -
  • -

    Z: Zombie, we discussed in a previous lesson that zombies are terminated processes that are waiting to have their statuses collected

    -
  • -
  • -

    T: Stopped, a process that has been suspended/stopped

    -
  • -
-
-
-
-
-
-

2. Thread

-
-
-
-
A thread is an execution unit that has its own program counter, a stack and a set of registers that reside in a process
-
-
-
-

Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources.

-
-
-

The threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variables at any given time.

-
-
-
- -
-

Threads in the same process share:

-
-
-
    -
  • -

    Process instructions

    -
  • -
  • -

    open files, data

    -
  • -
  • -

    signals and signal handlers

    -
  • -
  • -

    current working directory

    -
  • -
  • -

    User and group id

    -
  • -
-
-
-
-
- - - - - -
- - -A thread is also called Light Weight Process (LWP). -
-
-
-

2.1. Implementations

-
-
    -
  • -

    LinuxThreads

    -
    -
      -
    • -

      The default thread implementation since Linux kernel 2.0 (introduced in 1996)

      -
    • -
    -
    -
  • -
  • -

    Native POSIX Thread Library (NPTL)

    -
    -
      -
    • -

      NPTL has been part of Red Hat Enterprise Linux since version 3, and in the Linux kernel since version 2.6. It is now a fully integrated part of the GNU C Library.

      -
    • -
    -
    -
  • -
  • -

    Next Generation POSIX Thread (NGPT)

    -
    -
      -
    • -

      A IBM developed version of POSIX thread library. The NGPT team collaborated closely with the NPTL team and combined the best features of both implementations into NPTL.

      -
    • -
    -
    -
  • -
-
-
-
-

2.2. Threads vs. processes pros and cons

-
-
    -
  • -

    processes are typically independent, while threads exist as subsets of a process

    -
  • -
  • -

    processes carry considerably more state information than threads, whereas multiple threads within a process share process state as well as memory and other resources

    -
  • -
  • -

    processes have separate address spaces, whereas threads share their address space

    -
  • -
  • -

    processes interact only through system-provided inter-process communication mechanisms

    -
  • -
  • -

    context switching between threads in the same process typically occurs faster than context switching between processes

    -
  • -
-
-
-

Advantages and disadvantages of threads vs processes include:

-
-
-
    -
  • -

    Lower resource consumption of threads: using threads, an application can operate using fewer resources than it would need when using multiple processes.

    -
  • -
  • -

    Simplified sharing and communication of threads: unlike processes, which require a message passing or shared memory mechanism to perform inter-process communication (IPC), threads can communicate through data, code and files they already share.

    -
  • -
-
-
- - - - - -
- - -Thread crashes a process: due to threads sharing the same address space, an illegal operation performed by a thread can crash the entire process; therefore, one misbehaving thread can disrupt the processing of all the other threads in the application. -
-
-
-

2.2.1. When should you prefer fork() over threading and vice-verse?

-
-

When you’re doing a far more complex task than just instantiating a worker, or you want the implicit security sandboxing of separate processes.

-
-
-
-

2.2.2. If I want to call an external application as a child, then should I use fork() or threads to do it?

-
-

If the child will do an identical task to the parent, with identical code, use fork. For smaller subtasks use threads.

-
-
-
-

2.2.3. it is bad thing to call a fork() inside a thread?

-
-

it’s computationally rather expensive to duplicate a process and a lot of subthreads.

-
-
-
-
-
-
-

3. Process Memory

-
-
-
-
A process uses its own memory area to perform work.
-
-
-
-
- -
-
    -
  • -

    Text Segment.

    -
    -
      -
    • -

      The Text segment (a.k.a the Instruction segment) contains the executable program code and constant data.

      -
    • -
    -
    -
  • -
  • -

    Data Segment

    -
    -
      -
    • -

      Heap

      -
      -
        -
      • -

        Heap is the segment from which the memory is provided. (e.g. malloc())

        -
      • -
      -
      -
    • -
    • -

      BSS:

      -
      -
        -
      • -

        The area where zero-initialized data is stored. All the global variable which are not initialized in the program are stored in the BSS segment.

        -
      • -
      -
      -
    • -
    • -

      Data:

      -
      -
        -
      • -

        The area where initialized data are stored.

        -
      • -
      -
      -
    • -
    -
    -
  • -
  • -

    Stack Segment

    -
    -
      -
    • -

      The stack segment is used by the process for the storage of automatic identifier, register variables, and function call information.

      -
    • -
    -
    -
  • -
-
-
-
-
-
what process is attached to a shared memory segment?
-
-
You can use:
-ipcs -mp to get the process ID
-and
-with the command grep [shared memory segment] /proc/*/maps
-
-
-
- - - - - -
- - -ipcs shows information on the inter-process communication facilities for which the calling process has read access. -By default it shows information about all three resources: shared memory segments, message queues, and semaphore arrays. -
-
-
-
-
-

4. Process priority (nice)

-
-
-

In Linux we can set guidelines for the CPU to follow when it is looking at all the tasks it has to do. -These guidelines are called niceness or nice value.

-
-
-

The "niceness" scale goes from

-
-
-
    -
  • -

    -20 (highest priority value)

    -
  • -
  • -

    19 (lowest priority value)

    -
  • -
  • -

    default is 0

    -
  • -
-
-
-

The nice priority is actually used for user programs.

-
-
- - - - - -
- - -Priority is all about managing processor time -
-
-
-
-
nice  run a program with modified scheduling priority
-chrt  allows to set your scheduling policy as well as priority.
-
-
-
-
-
-

5. Scheduler

-
-
-
- -
-
-
The scheduler is the Linux kernel part that decides which runnable process will be executed by the CPU next.
-
-
-
-

It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

-
-
-
-
- - - - - -
- - -
-

The scheduler makes it possible to execute multiple programs at the same time, thus sharing the CPU with users of varying needs.

-
-
-
    -
  • -

    Minimizing response time

    -
  • -
  • -

    Maximizing overall CPU utilization

    -
  • -
-
-
-
-
- - - - - -
- - -Since Linux 2.6.23, the default scheduler is CFS, the "Completely Fair Scheduler". The - CFS scheduler replaced the earlier "O(1)" scheduler. [5] [6] -
-
-
-
-
-

6. Context switching

-
-
-

Context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point. -This allows multiple processes to share a single central processing unit (CPU), and is an essential feature of a multitasking operating system.

-
-
-

In the Linux kernel, context switching involves

-
-
-
    -
  • -

    switching registers

    -
  • -
  • -

    stack pointer

    -
  • -
  • -

    program counter

    -
  • -
  • -

    flushing the translation lookaside buffer (TLB)

    -
  • -
  • -

    and loading the page table of the next process to run (unless the old process shares the memory with the new).

    -
  • -
-
-
-
-
-

7. Interrupts

-
-
-

An interrupt is an event that alters the normal execution flow of a program and can be generated by hardware devices or even by the CPU itself.

-
-
-

Interrupts can be grouped into two categories based on the source of the interrupt:

-
-
-
    -
  • -

    synchronous, generated by executing an instruction

    -
  • -
  • -

    asynchronous, generated by an external event

    -
    -
      -
    • -

      For example a network card generates an interrupts to signal that a packet has arrived.

      -
    • -
    -
    -
  • -
-
-
-
-
Information related to hard interrupts at /proc/interrupts
-
-
-
-
-
-
-
-
-1. http://www.it.uu.se/education/course/homepage/os/vt18/images/module-2/fork-exec-exit-wait.png -
-
-2. https://commons.wikimedia.org/w/index.php?curid=2233446 -
-
-3. https://gabrieletolomei.files.wordpress.com/2013/10/program_in_memory2.png?w=960 -
-
-4. By ScotXW - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=47075153 -
-
-5. https://en.wikipedia.org/wiki/Completely_Fair_Scheduler -
-
-6. https://www.kernel.org/doc/html/latest/scheduler/index.html -
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/zwstm76b6r.html b/src-local/LabLearningObject-hybrid-tmp/zwstm76b6r.html deleted file mode 100644 index 0e4460e..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/zwstm76b6r.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Absolute basics

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Absolute basics
CommandMeaning

ls

Displays a list of files in the current working directory.

cd directory

change directories

passwd

change the password for the current user

file filename

display file type of file with name filename

cat textfile

throws content of textfile on the screen

pwd

display present working directory

exit or logout

leave this session

man command

read man pages on command

-
-

1.1. Key combinations

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 2. Key combinations
Key or key combinationFunction

Ctrl+C

End a running program and return the prompt

Ctrl+Z

Suspend a program

ArrowUp and ArrowDown

Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.

Tab

Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.

Tab Tab

Shows file or command completion possibilities.

Shift+PageUp and Shift+PageDown

Browse terminal buffer (to see text that has "scrolled off" the screen).

-
-
-

1.2. ls -l

-
-
-
# ls -al
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  23 21:55 .
-drwxrwxr-x 9 zeus zeus  4096 Οκτ  15 14:28 ..
-drwxrwxr-x 8 zeus zeus  4096 Οκτ  23 21:55 .git
-drwxrwxr-x 4 zeus zeus  4096 Οκτ  14 20:24 install
-crw-------   1 root root        5,   1 Οκτ  23 21:22 console
-lrwxrwxrwx   1 root root            11 Οκτ  23 21:21 core -> /proc/kcore
-drwxr-xr-x   4 root root           100 Οκτ  23 21:22 cpu
-crw-------   1 root root       10,  59 Οκτ  23 21:21 cpu_dma_latency
-crw-------   1 root root       10, 203 Οκτ  23 21:21 cuse
--rw-rw-r-- 1 zeus zeus  1517 Οκτ  23 21:55 INSTALL.md
--rw-rw-r-- 1 zeus zeus 33883 Οκτ  15 14:28 LICENSE
--rw-rw-r-- 1 zeus zeus   691 Οκτ  17 11:13 README.md
-
-
-
-

1.2.1. File types

-
-

This table gives an overview of the characters determining the file type:

-
-
- - - - - -
- - -drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install -
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 3. File types in a long list
SymbolMeaning

-

Regular file

d

Directory

l

Link

c

Special file

s

Socket

p

Named pipe

b

Block device

-
- - - - - -
- - --rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md -
-
-
-
-

1.2.2. Access rights

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. Access rights
CodeMeaning

0 or -

The access right that is supposed to be on this place is not granted.

4 or

read access is granted to the user category defined in this place

2 or

write permission is granted to the user category defined in this place

1 or

execute permission is granted to the user category defined in this place

-
-
-

1.2.3. User group codes

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 5. User group codes
CodeMeaning

u

user permissions

-rw-rw-r--

g

group permissions

-rw-rw-r--

o

permissions for others

-rw-rw-rw-

-
-
-

1.2.4. Exercises

-
-
-
touch example
-chmod 400 example
-ls -l example
-chmod 500 example
-ls -l example
-chmod 600 example
-ls -l example
-chmod 644 example
-ls -l example
-chmod 660 example
-ls -l example
-chmod 700 example
-ls -l example
-chmod 755 example
-ls -l example
-chmod 775 example
-ls -l example
-ls -l example
-chmod 777 example
-ls -l example
-
-
-
-


-
-

-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/zyf8gevajjk.html b/src-local/LabLearningObject-hybrid-tmp/zyf8gevajjk.html deleted file mode 100644 index 448e160..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/zyf8gevajjk.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-

1. Linux file system layout

-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Subdirectories of the root directory
DirectoryContent

/bin

Common programs, shared by the system, the system administrator and the users.

/boot

The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.

/dev

Contains references to all the CPU peripheral hardware, which are represented as files with special properties.

/etc

Most important system configuration files are in /etc

/home

Home directories of the common users.

/lib

Library files, includes files for all kinds of programs needed by the system and the users.

/mnt

Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/opt

Typically contains extra and third party software.

/proc

A virtual file system containing information about system resources.

/root

The administrative user’s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.

/sbin

Programs for use by the system and the system administrator.

/tmp

Temporary space for use by the system, cleaned upon reboot, so don’t use this for saving any work!

/usr

Programs, libraries, documentation etc. for all user-related programs.

/var

Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.

-
-


-
-

-
-
-
-
- - - - \ No newline at end of file diff --git a/src-local/LabLearningObject-hybrid-tmp/zzfhqxtl62.html b/src-local/LabLearningObject-hybrid-tmp/zzfhqxtl62.html deleted file mode 100644 index 8aa4b10..0000000 --- a/src-local/LabLearningObject-hybrid-tmp/zzfhqxtl62.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - - - - -An Introduction to Linux ! - - - - - - -
-
-
-
-


-
-
-
-
procfs
-
-

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, -providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

-
-
-

Typically

-
-
-
    -
  • -

    it is mapped to a mount point named /proc at boot time.

    -
  • -
  • -

    The proc file system acts as an interface to internal data structures in the kernel.

    -
  • -
  • -

    It can be used to obtain information about the system and to change certain kernel parameters at runtime (sysctl).

    -
  • -
-
-
-
-
-
-
-

1. The /proc Filesystem

-
-
- - - - - -
- - -The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls. -
-
-
-

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

-
-
-

The link ‘self’ points to the process reading the file system. Each process subdirectory has the entries listed in: ls /proc/<pid>

-
-
-
-
cat /proc/meminfo
-
-
-MemTotal:        8174328 kB
-MemFree:         6186516 kB
-MemAvailable:    7535332 kB
-Buffers:          146740 kB
-Cached:          1294156 kB
-SwapCached:            0 kB
-Active:           967184 kB
-Inactive:         606252 kB
-Active(anon):     135620 kB
-Inactive(anon):    85064 kB
-Active(file):     831564 kB
-Inactive(file):   521188 kB
-Unevictable:        3652 kB
-Mlocked:            3652 kB
-SwapTotal:             0 kB
-SwapFree:              0 kB
-Dirty:                68 kB
-Writeback:             0 kB
-AnonPages:        136188 kB
-Mapped:           113344 kB
-Shmem:             85724 kB
-Slab:             340236 kB
-SReclaimable:     302048 kB
-SUnreclaim:        38188 kB
-KernelStack:        3792 kB
-PageTables:         4888 kB
-NFS_Unstable:          0 kB
-Bounce:                0 kB
-WritebackTmp:          0 kB
-CommitLimit:     4087164 kB
-Committed_AS:     901432 kB
-VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB
-VmallocChunk:          0 kB
-HardwareCorrupted:     0 kB
-AnonHugePages:     51200 kB
-CmaTotal:              0 kB
-CmaFree:               0 kB
-
-...
-
-
- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Main entries in /proc
FileContent

/proc/cmdline

– Kernel command line information.

/proc/console

– Information about current consoles including tty.

/proc/crypto

- a list of available cryptographic modules

/proc/devices

– Device drivers currently configured for the running kernel.

/proc/diskstats

- giving some information (including device numbers) for each of the logical disk devices

/proc/dma

– Info about current DMA channels.

/proc/fb

– Framebuffer devices.

/proc/filesystems

– Current filesystems supported by the kernel.

/proc/interrupts, /proc/iomem, /proc/ioports and the directory /proc/irq

- giving some self-explanatory details about the devices (physical or logical) using the various system resources

/proc/iomem

– Current system memory map for devices.

/proc/ioports

– Registered port regions for input output communication with device.

/proc/loadavg

– System load average.

/proc/locks

– Files currently locked by kernel.

/proc/meminfo

– Info about system memory (see above example).

/proc/misc

– Miscellaneous drivers registered for miscellaneous major device.

/proc/modules

- one of the most important files in /proc, containing a list of the kernel modules currently loaded . It gives some indication (not always entirely correct) of dependencies.

/proc/mounts

– List of all mounts in use by system.

/proc/mounts

- a symlink to self/mounts which contains a list of the currently mounted devices and their mount points (and which file system is in use and what mount options are in use).

/proc/net

- a directory containing useful information about the network stack, in particular /proc/net/nf_conntrack, which lists existing network connections (particularly useful for tracking routing when iptables FORWARD is used to redirect network connections)

/proc/partitions

– Detailed info about partitions available to the system.

/proc/pci

– Information about every PCI device.

/proc/stat

– Record or various statistics kept from last reboot.

/proc/swap

– Information about swap space.

/proc/scsi

- giving information about any devices connected via a SCSI or RAID controller

/proc/sysvipc

- containing memory-sharing and inter-process communication (IPC) information.

/proc/tty

- containing information about the current terminals; /proc/tty/driver looks to be[original research?] a list of the different types of tty available - each of which is a list of those of each type

/proc/uptime

– Uptime information (in seconds).

/proc/version

– Kernel version, gcc version, and Linux distribution installed.

-
-
-
-

2. cpu info

-
-
-
-
cat /proc/cpuinfo
-
-processor	: 0
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 2000.000
- cache size	: 1024 KB
- ...
- processor	: 1
- vendor_id	: AuthenticAMD
- cpu family	: 16
- model		: 6
- model name	: AMD Athlon(tm) II X2 270 Processor
- stepping	: 3
- microcode	: 0x10000c8
- cpu MHz		: 800.000
- cache size	: 1024 KB
-
-
-
-
-
- - - - \ No newline at end of file