<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ta-lim</title>
    <description>The latest articles on DEV Community by ta-lim (@talim).</description>
    <link>https://dev.to/talim</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1027247%2F5d8a4dae-0aae-4ccb-95d3-e80fd7c7a934.jpg</url>
      <title>DEV Community: ta-lim</title>
      <link>https://dev.to/talim</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/talim"/>
    <language>en</language>
    <item>
      <title>Concurrency Problems</title>
      <dc:creator>ta-lim</dc:creator>
      <pubDate>Thu, 13 Apr 2023 15:46:21 +0000</pubDate>
      <link>https://dev.to/talim/concurrency-problems-jg2</link>
      <guid>https://dev.to/talim/concurrency-problems-jg2</guid>
      <description>&lt;p&gt;Competition for resources and two common problems that arise due to competition in computer processes can be a bit challenging to comprehend. When two or more processes compete for the same resources, such as I/O equipment, memory, clock, and others, without any information exchange mechanism between the processes, it can cause problems. As a result, the rejected process will slow down, and sometimes, a blocked process may occur, never accessing the resource.&lt;/p&gt;

&lt;p&gt;The problems that arise from competition in computer processes can be categorized into two types: the Producer-Consumer Problem and the Reader-Writer Problem. The Producer-Consumer Problem occurs when there are two or more processes interacting using the same buffer, with one process acting as a Producer (adding value to the buffer), and another process acting as a Consumer (taking/reducing the buffer's contents).&lt;/p&gt;

&lt;p&gt;One type of issue that arises from competition among computer processes is the Producer-Consumer Problem, which occurs when two or more processes interact using the same buffer, with one process acting as a producer (adding values to the buffer) and another acting as a consumer (removing/reducing the buffer's contents). In order to overcome this problem, requirements such as regulating the critical section, limiting access to the same resource, and halting production or consumption when the buffer is full or empty, must be met.&lt;/p&gt;

&lt;p&gt;Another type of issue that can arise from competition among computer processes is the Reader-Writer Problem, which occurs when multiple processes read (reader) the same data at the same time. To overcome this problem, requirements such as allowing two or more readers to read data simultaneously, preventing any reader from reading data while the writer is writing data, and ensuring that the writer waits for all readers to finish reading data, must be met. Techniques such as mutual exclusion, semaphore, monitor, and lock can be used to address competition among computer processes and overcome these issues.&lt;/p&gt;

&lt;p&gt;Meanwhile, the Reader-Writer Problem occurs when several processes read (reader) the same data simultaneously. The requirements to overcome this problem are that two or more readers can read data together, no reader can read data when data is being written by the writer, and the writing process must wait for all readers who are reading data to finish reading.&lt;/p&gt;

&lt;p&gt;To solve the problem of competition in computer processes, there are several techniques that can be used, such as mutual exclusion, semaphore, monitor, and lock. The mutual exclusion technique is used to limit access to the same resources. The semaphore is used for synchronization between processes, where there is a flag or token setting indicating whether the resource is being used or not. Monitors and locks are also used to ensure that accessing the same resources does not occur simultaneously.&lt;/p&gt;

&lt;h2&gt;
  
  
  For solution
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Mutual Exclusion
&lt;/h3&gt;

&lt;p&gt;condition where only one process or thread can access a particular resource at a given time. This is necessary to prevent errors when multiple processes or threads attempt to access the same resource simultaneously. For example, when two processes try to change the same data at the same time, it can cause damage to the data. To prevent this, only one process or thread can access the resource at a given time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mutual Exclusion&lt;/strong&gt; can be handled using locking techniques. Locking allows processes or threads to hold a key or token to access a particular resource. If the resource is already locked by a certain process or thread, other processes or threads cannot access it until the key or token is released. This technique ensures that only one process or thread can access the resource at a given time, thereby preventing errors and data corruption.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Deadlock
&lt;/h3&gt;

&lt;p&gt;condition where two or more processes are waiting for each other to release the required resources. As a result, no process can complete its task, and the program gets stuck in a dead state. This can happen if each process holds the resource required by another process, so no one can release the resource. To avoid deadlock, the operating system can use algorithms to detect and prevent such conditions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deadlock&lt;/strong&gt; can be handled by using algorithms to detect and prevent the condition. One commonly used algorithm is the Banker's Algorithm. This algorithm ensures that a process can only start if all the required resources are available and will not cause deadlock. Additionally, if a deadlock is detected, the operating system can force processes to release the resources they have taken or perform a system restart to avoid deadlock.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Starvation
&lt;/h3&gt;

&lt;p&gt;condition where a process or thread cannot access the required resources to complete its task because the resources are always being used by other processes or threads. This can happen if the operating system does not prioritize certain processes or threads, allowing some to keep using the same resources while others do not have access to those resources. To avoid starvation, the operating system can use algorithms to ensure that each process or thread gets access to the resources it needs to complete its task.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Starvation&lt;/strong&gt; can be handled using priority techniques. In an operating system, processes or threads can be prioritized based on their urgency or importance in completing a task. This technique ensures that the most important processes or threads get access to the resources they need to complete their tasks first, thereby preventing processes or threads from being constantly blocked and experiencing starvation.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Data coherence
&lt;/h3&gt;

&lt;p&gt;condition where the same data stored in multiple locations maintains the same integrity and consistency. In a multi-process or multi-thread environment, where several processes or threads can access the same data, data coherence is crucial to prevent conflicts and errors in data. The operating system uses data coherence techniques such as cache consistency protocols and time-based access control to ensure that all processes or threads always see the same version of the data they are using.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data coherency&lt;/strong&gt; can be handled using cache consistency protocols. These protocols ensure that every process or thread always sees the same version of the data they are using, even if the data is stored in multiple locations. Additionally, time-based access control can be used to ensure that every process or thread that needs access to the data gets access in the correct order, thereby preventing errors and conflicts on the data.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Command Management Process and Thread in UBUNTU</title>
      <dc:creator>ta-lim</dc:creator>
      <pubDate>Fri, 17 Mar 2023 02:52:31 +0000</pubDate>
      <link>https://dev.to/talim/command-management-process-and-thread-in-ubuntu-561i</link>
      <guid>https://dev.to/talim/command-management-process-and-thread-in-ubuntu-561i</guid>
      <description>&lt;h2&gt;
  
  
  Managing service
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;service &amp;lt;service_name&amp;gt; &amp;lt;action&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example:
service sshd status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffc9dc0pobnxlkmxhu2tu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffc9dc0pobnxlkmxhu2tu.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;service sshd start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdvpx30vwdjzyhxgrnx5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdvpx30vwdjzyhxgrnx5.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;service sshd stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjkujj5b3znl349sym5kt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjkujj5b3znl349sym5kt.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Where  is the name of the system service you want to manage, and  is the action you want to perform on the service (such as start, stop, restart, enable, or disable).&lt;/p&gt;

&lt;p&gt;In addition to the basic syntax, the service command also supports several attributes or options that can be used to customize its behavior. Some of the most commonly used attributes include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;status-all: This attribute displays the status of all system services, whether they are currently running or not.&lt;/li&gt;
&lt;li&gt;reload: This attribute reloads the configuration file for a service without actually stopping and restarting the service.&lt;/li&gt;
&lt;li&gt;full-restart: This attribute performs a full restart of a service, which involves stopping and then starting the service again.&lt;/li&gt;
&lt;li&gt;list: This attribute lists all available system services that can be managed with the service command.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Running Init
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;/etc/init.d/[servie] [command]&lt;/code&gt;&lt;br&gt;
the /etc/init.d command in Linux is a directory containing scripts used to start, stop, and restart system services on the system. These scripts can be run directly using specific arguments, or using the service command, which provides a simpler interface for managing system services.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example:
/etc/init.d/ssh start
/etc/init.d/ssh stop
/etc/init.d/ssh restart
/etc/init.d/ssh status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhw87t4xiokndzbj0ux27.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhw87t4xiokndzbj0ux27.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Top
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;top&lt;/code&gt;&lt;br&gt;
The purpose of the top command is to provide an easy-to-use interface for monitoring and managing running processes on a Linux system. It can be used to identify resource-intensive processes, find out which processes are consuming the most system resources, and terminate or suspend processes as needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4f460y3r2lbqu8n744o2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4f460y3r2lbqu8n744o2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  description of each column in the table output:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;PID: The process ID of the task.&lt;/li&gt;
&lt;li&gt;USER: The user who started the process.&lt;/li&gt;
&lt;li&gt;PR: The priority of the process.&lt;/li&gt;
&lt;li&gt;NI: The "nice" value of the process, which determines its priority in the scheduling queue.&lt;/li&gt;
&lt;li&gt;VIRT: The total amount of virtual memory used by the process.&lt;/li&gt;
&lt;li&gt;RES: The amount of physical memory used by the process.&lt;/li&gt;
&lt;li&gt;SHR: The amount of shared memory used by the process.&lt;/li&gt;
&lt;li&gt;S: The process state. It can be R (running), S (sleeping), D (disk sleep), Z (zombie), or T (stopped).&lt;/li&gt;
&lt;li&gt;%CPU: The percentage of CPU time used by the process since the last update.&lt;/li&gt;
&lt;li&gt;%MEM: The percentage of physical memory used by the process.&lt;/li&gt;
&lt;li&gt;TIME+: The total CPU time used by the process since it started.&lt;/li&gt;
&lt;li&gt;COMMAND: The command that started the process.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Some of the key attributes of the top command include:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Process List: The main display of the top command is a list of all the processes running on the system, along with detailed information about each process, such as the process ID (PID), user, CPU usage, memory usage, and more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Resource Consumption: The top command provides real-time information about the system's resource usage, including CPU usage, memory usage, and system uptime. This information is displayed both as overall statistics for the entire system and as individual statistics for each process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sorting Options: The top command allows users to sort the process list based on a variety of criteria, such as CPU usage, memory usage, process ID, and more. This makes it easy to identify resource-intensive processes and take action as needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Interactive Features: The top command is an interactive tool that allows users to manipulate the process list in real-time. For example, users can suspend or resume processes, change the priority of running processes, and more.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>serverless</category>
      <category>ubuntu</category>
      <category>os</category>
      <category>systems</category>
    </item>
    <item>
      <title>Process and Thread</title>
      <dc:creator>ta-lim</dc:creator>
      <pubDate>Fri, 17 Mar 2023 02:30:15 +0000</pubDate>
      <link>https://dev.to/talim/process-and-thread-gf7</link>
      <guid>https://dev.to/talim/process-and-thread-gf7</guid>
      <description>&lt;h2&gt;
  
  
  Summarize from Youtube Videos
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Process Management (Processes and Threads) (&lt;a href="https://www.youtube.com/watch?v=OrM7nZcxXZU"&gt;Youtube&lt;/a&gt;)&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Process
&lt;/h2&gt;

&lt;p&gt;A process is an instance of a program that is currently being executed. It is an independent entity that consists of an address space, a set of data structures, and one or more threads of execution. The state of a process can be represented by various states, such as running, ready, waiting, and terminated. Process models can vary, but common ones include the parent-child model and the peer model.&lt;/p&gt;

&lt;p&gt;On Unix systems, processes are represented by process IDs (PIDs) and can be managed using various system calls and commands, such as fork(), exec(), kill, and ps.&lt;/p&gt;

&lt;h3&gt;
  
  
  Main Requirements of Process Control
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Concurrent execution: the ability of the operating system to run multiple processes simultaneously.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sharing resources: processes can share resources such as memory, CPU, and I/O devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Independent address space: each process has a separate memory address to prevent one process from corrupting the memory of another process.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Process State
&lt;/h3&gt;

&lt;p&gt;The process state reflects the state of the process in its life cycle. There are several commonly known process states, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;New: the process is in the process of being created.&lt;/li&gt;
&lt;li&gt;Ready: the process is ready to be executed by the CPU.&lt;/li&gt;
&lt;li&gt;Running: the process is currently being executed by the CPU.&lt;/li&gt;
&lt;li&gt;Blocked: the process cannot run because it is waiting for a resource or external input.&lt;/li&gt;
&lt;li&gt;Terminated: the process has finished executing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Process Creation and Termination
&lt;/h4&gt;

&lt;h5&gt;
  
  
  Creation
&lt;/h5&gt;

&lt;p&gt;Processes are created when a program starts or when a program requests to create a new process. A new process has a unique identity in the operating system, including a process ID (PID), address space, and PCB.&lt;/p&gt;

&lt;h5&gt;
  
  
  Termination
&lt;/h5&gt;

&lt;p&gt;Processes can end for a number of reasons, such as completing execution, being stopped by the operating system, or experiencing failure during execution. When a process ends, the operating system will clean up the resources used by the process, including memory and open files. Processes can also be forcibly stopped by the operating system in certain situations, such as if the process accesses unauthorized memory or if the process experiences a deadlock.&lt;/p&gt;

&lt;h5&gt;
  
  
  Events that can trigger the creation and termination of a process
&lt;/h5&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Events that Trigger Process Creation&lt;/th&gt;
&lt;th&gt;Events that Trigger Process Termination&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;User request&lt;/td&gt;
&lt;td&gt;Normal completion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;System initialization&lt;/td&gt;
&lt;td&gt;Error&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interrupts&lt;/td&gt;
&lt;td&gt;Killed by another process&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fork system call&lt;/td&gt;
&lt;td&gt;User intervention&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Exec system call&lt;/td&gt;
&lt;td&gt;System shutdown&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Model Process
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Two-state model
&lt;/h4&gt;

&lt;p&gt;Simple model that describes a system or process that can exist in one of two states. These two states are typically referred to as "on" and "off", "up" and "down", or "working" and "not working", depending on the context of the system or process being described.&lt;/p&gt;

&lt;p&gt;The two-state model is commonly used in various fields such as electronics, mechanics, and computer science. For example, a light switch can be considered a two-state model, as it can be either "on" or "off". Similarly, a computer network connection can be considered a two-state model, as it can be either "connected" or "disconnected".&lt;/p&gt;

&lt;p&gt;The simplicity of the two-state model makes it useful for modeling and analyzing systems that can be described in binary terms. However, it may not be suitable for more complex systems that require more nuanced descriptions of state.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4TV3wm4p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media.geeksforgeeks.org/wp-content/uploads/20211208184424/gfgf1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4TV3wm4p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media.geeksforgeeks.org/wp-content/uploads/20211208184424/gfgf1.PNG" alt="Image description" width="688" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Five-state model
&lt;/h4&gt;

&lt;p&gt;five-state model is a common model used to describe the various states that a process can be in during its lifecycle. The five states are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;New: This is the initial state of a process, where the process is being created.&lt;/li&gt;
&lt;li&gt;Ready: In this state, the process is waiting to be assigned to a processor. It is loaded into main memory and is ready to run, but the CPU is currently executing another process.&lt;/li&gt;
&lt;li&gt;Running: In this state, the process has been assigned to a processor and is currently executing its instructions.&lt;/li&gt;
&lt;li&gt;Blocked (Waiting): In this state, the process is waiting for an event to occur or for a resource to become available. For example, it may be waiting for user input, waiting for I/O operations to complete, or waiting for a signal from another process.&lt;/li&gt;
&lt;li&gt;Terminated (Exit): In this state, the process has finished its execution and is being removed from the system. The process releases any resources it was using, and its PCB is deleted from the system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZjvpNyoY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media.geeksforgeeks.org/wp-content/uploads/20211221191700/5stae.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZjvpNyoY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media.geeksforgeeks.org/wp-content/uploads/20211221191700/5stae.PNG" alt="Image description" width="879" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Two-Level Model
&lt;/h4&gt;

&lt;p&gt;The Two-Level Model is a process state model that divides process states into two levels: User Level and Kernel Level. The User Level states, which include Running, Ready, and Blocked, are managed by the process scheduler. Running is the state of a process that is currently executing on the CPU, while Ready is the state of a process that is waiting to be assigned to the CPU. Blocked is the state of a process that is waiting for an event to occur, such as the completion of an I/O operation.&lt;/p&gt;

&lt;p&gt;The Kernel Level states, which include Interrupted, Waiting, and Zombie, are managed by the operating system kernel. Interrupted occurs when a process is interrupted by a hardware event, such as a timer interrupt. Waiting occurs when a process is waiting for a resource, such as I/O, to become available. Zombie occurs when a process has completed its execution, but its exit status has not yet been retrieved by its parent process.&lt;/p&gt;

&lt;p&gt;The Two-Level Model provides a clear separation between user-level states and kernel-level states. This allows for efficient management of processes and resources, as the operating system can focus on managing the kernel-level states while leaving the user-level states to be managed by the process scheduler. The model also allows for easy implementation of process synchronization and communication mechanisms.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9ClxUjVW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/http://www.ksvali.com/wp-content/uploads/2009/09/processstate.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9ClxUjVW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/http://www.ksvali.com/wp-content/uploads/2009/09/processstate.gif" alt="Image description" width="880" height="687"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Description:
&lt;/h5&gt;

&lt;p&gt;-Created-Process is newly created by system call, is not ready to run&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User running-Process is running in user mode which means it is a user process.&lt;/li&gt;
&lt;li&gt;Kernel Running-Indicates process is a kernel process running in kernel mode.&lt;/li&gt;
&lt;li&gt;Zombie- Process does not exist/ is terminated.&lt;/li&gt;
&lt;li&gt;Preempted- When process runs from kernel to user mode, it is said to be preempted.&lt;/li&gt;
&lt;li&gt;Ready to run in memory- It indicated that process has reached a state where it is ready to run in memory and is waiting for kernel to schedule it.&lt;/li&gt;
&lt;li&gt; Ready to run, swapped– Process is ready to run but no empty main memory is present&lt;/li&gt;
&lt;li&gt;Sleep, swapped- Process has been swapped to secondary storage and is at a blocked state.&lt;/li&gt;
&lt;li&gt; Asleep in memory- Process is in memory(not swapped to secondary storage) but is in blocked state.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Some Related Terms
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Process: A program that is currently running on a computer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Thread: A sub-part of a process that can be scheduled independently by the operating system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Process Control Block (PCB): A data structure used by the operating system to store information about a process, including information about the process state, status registers, and pointers to the memory used by the process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Trace: A component of the operating system responsible for monitoring process activity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dispatcher: A component of the operating system responsible for allocating CPU time to the process selected by the scheduler.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Threads
&lt;/h2&gt;

&lt;p&gt;A thread is a separate path of execution within a process. It shares the same memory space and resources as the process that it belongs to. Threads can improve performance and responsiveness of a program, especially in systems with multiple CPUs or cores.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advantages of Using Threads:
&lt;/h3&gt;

&lt;p&gt;A thread is the basic unit of parallel processing that allows multiple tasks to be executed simultaneously within a program. Some advantages of using threads in programming include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Improving Program Responsiveness: By using threads, a program can respond to inputs and events faster, thus improving program speed and performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Simplifying Programming: In some cases, using threads can simplify the programming process by allowing for separate and parallel management of different tasks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improving Resource Efficiency: Threads can help improve the use of computer resources, such as CPU and memory, by allowing multiple tasks to be executed simultaneously.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Single Threading Approach
&lt;/h3&gt;

&lt;p&gt;The single threading approach uses only one thread to execute a program. In this approach, tasks are processed serially and one by one. The weakness of this approach is that it is less effective in utilizing computer resources because it uses only one thread.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-Threading Approach
&lt;/h3&gt;

&lt;p&gt;The multi-threading approach allows for the use of multiple threads simultaneously within a program. With this approach, tasks can be processed in parallel, thus improving program efficiency and responsiveness.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gN99uOaI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/2048/1%2AanBcJi9xByBP4RW0QyhqWw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gN99uOaI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/2048/1%2AanBcJi9xByBP4RW0QyhqWw.png" alt="Image description" width="880" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Processes in the Multithreading Perspective
&lt;/h3&gt;

&lt;p&gt;In the multithreading perspective, a process can have several threads working on different tasks simultaneously. These threads can communicate and share resources, such as memory and CPU, to complete the given tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multicore and Multithreading
&lt;/h3&gt;

&lt;p&gt;Multicore is a technology that uses multiple cores on a CPU to improve computer performance. In combination with multithreading, the use of multicore technology can improve program efficiency and performance by allowing threads to be run on different cores.&lt;/p&gt;

&lt;h3&gt;
  
  
  Applications Benefiting from Multicore Concept:
&lt;/h3&gt;

&lt;p&gt;The multicore and multithreading concepts can be applied to various types of programs, such as programs that process images, videos, or audio, programs that perform intensive calculations, and programs that require real-time interaction. In these applications, this concept can significantly improve program performance and efficiency.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Image and video processing software&lt;/li&gt;
&lt;li&gt;Audio editing and recording software&lt;/li&gt;
&lt;li&gt;3D modeling and animation software&lt;/li&gt;
&lt;li&gt;Scientific simulation software&lt;/li&gt;
&lt;li&gt;Financial modeling and analysis software&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  the differences between processes and threads
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Processes&lt;/th&gt;
&lt;th&gt;Threads&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Definition&lt;/td&gt;
&lt;td&gt;A program in execution, consisting of an executable file and associated resources such as memory, system files, and I/O devices.&lt;/td&gt;
&lt;td&gt;A lightweight process that can execute concurrently with other threads within the same process.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resource ownership&lt;/td&gt;
&lt;td&gt;Each process has its own set of system resources, including memory, file descriptors, and sockets.&lt;/td&gt;
&lt;td&gt;All threads within a process share the same set of system resources, including memory and file descriptors.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Communication&lt;/td&gt;
&lt;td&gt;Processes typically communicate with each other using interprocess communication (IPC) mechanisms, such as pipes, sockets, or message queues.&lt;/td&gt;
&lt;td&gt;Threads can communicate with each other by directly accessing shared data within the same process.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scheduling&lt;/td&gt;
&lt;td&gt;Processes are scheduled and managed by the operating system kernel, which assigns each process a priority and time slice.&lt;/td&gt;
&lt;td&gt;Threads are scheduled and managed by the operating system kernel or by the process itself, depending on the threading model used.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Creation&lt;/td&gt;
&lt;td&gt;Processes are typically created using the fork() system call, which creates a copy of the parent process.&lt;/td&gt;
&lt;td&gt;Threads are created within a process using a thread library or a system call, such as pthread_create() on Unix-based systems.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Overhead&lt;/td&gt;
&lt;td&gt;Creating a new process incurs a significant amount of overhead, including memory allocation and copying of resources from the parent process.&lt;/td&gt;
&lt;td&gt;Creating a new thread is much faster than creating a new process, as the new thread shares the same resources as the parent process.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Isolation&lt;/td&gt;
&lt;td&gt;Processes are fully isolated from each other, meaning that a bug or crash in one process does not affect other processes.&lt;/td&gt;
&lt;td&gt;Threads share the same address space, so a bug or crash in one thread can affect the entire process.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scalability&lt;/td&gt;
&lt;td&gt;Processes are less scalable than threads, as they require more system resources and have higher overhead.&lt;/td&gt;
&lt;td&gt;Threads are more scalable than processes, as they can take advantage of multiple CPUs and have lower overhead.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Several to management in &lt;a href="https://dev.to/talim/command-management-process-and-thread-in-ubuntu-561i"&gt;LINUX UBUNTU&lt;/a&gt;
&lt;/h3&gt;

</description>
      <category>systems</category>
      <category>process</category>
      <category>thread</category>
      <category>ubuntu</category>
    </item>
    <item>
      <title>Management File</title>
      <dc:creator>ta-lim</dc:creator>
      <pubDate>Thu, 02 Mar 2023 02:45:32 +0000</pubDate>
      <link>https://dev.to/talim/management-file-47ok</link>
      <guid>https://dev.to/talim/management-file-47ok</guid>
      <description>&lt;h2&gt;
  
  
  File Management
&lt;/h2&gt;

&lt;p&gt;Is the process of managing and storing data on storage devices such as magnetic disks, magnetic tapes, and optical disks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Types of files
&lt;/h3&gt;

&lt;p&gt;that can be stored include numeric data, character data, binary data, as well as programs such as source programs, object programs, and executable programs.&lt;/p&gt;

&lt;h3&gt;
  
  
  The tasks and functions of file management
&lt;/h3&gt;

&lt;p&gt;a. Meeting the needs of data management and users.&lt;br&gt;
b. Ensuring data validity.&lt;br&gt;
c. Optimizing system performance and user response time.&lt;br&gt;
d. Providing I/O support for data storage devices.&lt;/p&gt;
&lt;h3&gt;
  
  
  File management is also responsible for:
&lt;/h3&gt;

&lt;p&gt;a. Minimizing the possibility of data loss or damage.&lt;br&gt;
b. Providing standard I/O interfaces.&lt;br&gt;
c. Providing I/O support for multiple users.&lt;br&gt;
d. Creating, modifying, and deleting files.&lt;/p&gt;
&lt;h4&gt;
  
  
  Additionally, file management must provide mechanisms for:
&lt;/h4&gt;

&lt;p&gt;Concurrent file usage.&lt;br&gt;
b. Data backup and recovery.&lt;br&gt;
c. Maintaining the confidentiality and security of information.&lt;br&gt;
d. Providing a user-friendly interface for users.&lt;/p&gt;
&lt;h3&gt;
  
  
  Table of differences between FAT and NTFS
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;FAT&lt;/th&gt;
&lt;th&gt;NTFS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;File and folder access&lt;/td&gt;
&lt;td&gt;No complex permissions&lt;/td&gt;
&lt;td&gt;Complex permissions with different levels of access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Journaling&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Partition size&lt;/td&gt;
&lt;td&gt;Up to 32 GB&lt;/td&gt;
&lt;td&gt;Up to several terabytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File and folder encryption&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes (using EPS)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File compression&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deleted file recovery&lt;/td&gt;
&lt;td&gt;Third-party software required&lt;/td&gt;
&lt;td&gt;Built-in feature for internal recovery&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Symbolic links&lt;/td&gt;
&lt;td&gt;Not supported&lt;/td&gt;
&lt;td&gt;Supported (symbolic link, hard link, and junction)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reliability&lt;/td&gt;
&lt;td&gt;More prone to corruption and requires more time to check and fix errors&lt;/td&gt;
&lt;td&gt;More resilient and has mechanisms for automatic partition error fixing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h5&gt;
  
  
  Note
&lt;/h5&gt;

&lt;p&gt;that the decision to use FAT or NTFS depends on specific usage needs and conditions. If you only need a small partition to store files or data, FAT may be a good choice. However, if you require advanced features such as encryption and complex permissions, NTFS may be a better choice.&lt;/p&gt;
&lt;h3&gt;
  
  
  Table comparing Structured Tree Directory and Acyclic Graph Directory
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Structured Tree Directory&lt;/th&gt;
&lt;th&gt;Acyclic Graph Directory&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Structure&lt;/td&gt;
&lt;td&gt;Uses a tree structure&lt;/td&gt;
&lt;td&gt;Uses a graph structure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Files and Directories&lt;/td&gt;
&lt;td&gt;Does not allow files and directories to be used together&lt;/td&gt;
&lt;td&gt;Allows files and directories to be used together&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Path Names&lt;/td&gt;
&lt;td&gt;Each file has a unique path name&lt;/td&gt;
&lt;td&gt;The same file or subdirectory may exist in multiple directories&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Security&lt;/td&gt;
&lt;td&gt;More secure since files and directories cannot be used together&lt;/td&gt;
&lt;td&gt;More vulnerable since files and directories can be used together and exist in multiple directories&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Simplicity&lt;/td&gt;
&lt;td&gt;More simple since it uses a tree structure&lt;/td&gt;
&lt;td&gt;More complex since it uses a graph structure and allows files and directories to be used together&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Usage&lt;/td&gt;
&lt;td&gt;Suitable for systems that require security and clear structure organization&lt;/td&gt;
&lt;td&gt;Suitable for systems that require flexibility and the ability to use files and directories together&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h5&gt;
  
  
  Note
&lt;/h5&gt;

&lt;p&gt;the decision to use either directory structure depends on the specific needs and purposes of the system.&lt;/p&gt;
&lt;h3&gt;
  
  
  Operations on files and directories
&lt;/h3&gt;
&lt;h4&gt;
  
  
  1. Create
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Create a new directory using the command: $ mkdir 
Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mkdir Latihan or $ mkdir latihan1 latihan2 latihan3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Create a directory with subdiectories using the command: $ mkdir –p //
Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mkdir –p OS/pratikum1/tugas1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Create an empty file using the command: $ touch 
Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ touch file1 file2 file3 file4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Create an empty file with a specific extension using the command: $ touch .
Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ touch file1.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_DmwNhbZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5vn6pajbpljoizhlfwvx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_DmwNhbZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5vn6pajbpljoizhlfwvx.png" alt="Image description" width="802" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7xFJI9x8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d80qzjf775nnnvi7o9iv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7xFJI9x8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d80qzjf775nnnvi7o9iv.png" alt="Image description" width="801" height="182"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  2. Write
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Write content to a file using an editor such as Nano or Vim.
Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ nano file1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E8QVz_Zt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q4rl0pishz4nwh2kcxcb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E8QVz_Zt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q4rl0pishz4nwh2kcxcb.png" alt="Image description" width="801" height="657"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write content to a file using the echo command: $ echo “text” &amp;gt; 
Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ echo “isi konten di sini” &amp;gt; draft
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---ZF1Ry9x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yjcn1bdmqroqwtk1jewb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---ZF1Ry9x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yjcn1bdmqroqwtk1jewb.png" alt="Image description" width="797" height="200"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  3. Read
&lt;/h4&gt;

&lt;p&gt;To read the contents of a file, use the command "cat "&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cat draft
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9aLaZ4wo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wuy4nv5whk3m9y0xzcdq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9aLaZ4wo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wuy4nv5whk3m9y0xzcdq.png" alt="Image description" width="241" height="52"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Delete
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;To remove a file, use the command "rm "
Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rm fill1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z5JDuhFB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgpexvlclj2jrz7d0wbc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z5JDuhFB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgpexvlclj2jrz7d0wbc.png" alt="Image description" width="801" height="134"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you want to remove a directory, make sure the directory is empty, and then use the command "rmdir "
Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rmdir latihan3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KHljozS7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fo977tf20ajw0p5fl26x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KHljozS7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fo977tf20ajw0p5fl26x.png" alt="Image description" width="447" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you want to remove a directory and its contents recursively, use the command "rm -r "
Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rm -r /home/ta-lim/kuliah/SO/pratikum1/tugas1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MHkgsWfJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e9obeptgf2io0untfkcr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MHkgsWfJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e9obeptgf2io0untfkcr.png" alt="Image description" width="649" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Reposition
&lt;/h4&gt;

&lt;p&gt;Searching files or directories can be done using the "find" command Files can be searched based on their name, type, or time&lt;br&gt;
Examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ find . -name "text"
$ find . -name latihan_nengok
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Omz5Gxmb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rs6an2x87ylg5sqh5yz0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Omz5Gxmb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rs6an2x87ylg5sqh5yz0.png" alt="Image description" width="315" height="57"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The "locate" command can also be used for searching, with examples like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ locate &amp;lt;keyword&amp;gt;
$ locate -i latihan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IabRVz28--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3jjkasnu36xo9p8ap2sm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IabRVz28--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3jjkasnu36xo9p8ap2sm.png" alt="Image description" width="463" height="117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  6. Truncate
&lt;/h4&gt;

&lt;p&gt;Truncate is used to change the size of a file without changing its attributes&lt;br&gt;
The file is resized to zero but still remains available&lt;br&gt;
The "truncate" operation can be done using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;the command: truncate –s &amp;lt;requested size&amp;gt; &amp;lt;filename&amp;gt;
Example: truncate –s 0 file1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wMnIPAD0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/boaxsfp1tk1icr5boikq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wMnIPAD0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/boaxsfp1tk1icr5boikq.png" alt="Image description" width="473" height="145"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---D5EkMSn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5snhwtuj1zylt278z13p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---D5EkMSn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5snhwtuj1zylt278z13p.png" alt="Image description" width="518" height="147"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Partial content can be deleted without opening the file itself&lt;br&gt;
&lt;strong&gt;Example:&lt;/strong&gt; file1 becomes zero-sized without deleting the file or its contents&lt;/p&gt;
&lt;h3&gt;
  
  
  File and directory manipulation
&lt;/h3&gt;
&lt;h4&gt;
  
  
  - View directory listings
&lt;/h4&gt;

&lt;p&gt;Use the command &lt;code&gt;$ pwd&lt;/code&gt; to know the current directory&lt;/p&gt;

&lt;p&gt;Use the command &lt;code&gt;$ cd&lt;/code&gt; to change directory, for example &lt;code&gt;$ cd ta-lim&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Use the command &lt;code&gt;$ cd ..&lt;/code&gt;to move to the previous directory&lt;/p&gt;

&lt;p&gt;Use the command &lt;code&gt;$ cd /&lt;/code&gt; to move to the root directory&lt;/p&gt;

&lt;p&gt;Use the command &lt;code&gt;$ ls&lt;/code&gt; to view the contents of the directory&lt;/p&gt;

&lt;p&gt;Use the command &lt;code&gt;$ ls -l&lt;/code&gt; to view the contents of the directory in list format&lt;/p&gt;

&lt;p&gt;Use the command &lt;code&gt;$ ls -a&lt;/code&gt; to view the contents of the directory including hidden files and directories&lt;/p&gt;

&lt;p&gt;Use the command &lt;code&gt;$ ls -aL&lt;/code&gt; to view the contents of the directory recursively&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6Opm0Lyf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g1wolcek1hhz9ofp6ebf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6Opm0Lyf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g1wolcek1hhz9ofp6ebf.png" alt="Image description" width="667" height="325"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  - Copy and Move files/directories
&lt;/h4&gt;

&lt;p&gt;Use the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cp &amp;lt;file name&amp;gt; &amp;lt;destination directory&amp;gt;
$ cp tugaskuliah /home/ta-lim/kuliah/SO
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to copy files/directories&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8V83ungL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q6iwupcuxj93qzxioxdy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8V83ungL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q6iwupcuxj93qzxioxdy.png" alt="Image description" width="661" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Use the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mv &amp;lt;file name&amp;gt; &amp;lt;destination directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to move files/directories or rename files/directories&lt;/p&gt;

&lt;h4&gt;
  
  
  - Recursion on files and directories
&lt;/h4&gt;

&lt;p&gt;In the context of delete operations, we discussed how to delete an empty directory in a previous discussion.&lt;br&gt;
Now, we will discuss how to delete a directory that still contains files inside. This requires a recursive approach.Recursion is a problem-solving method where the solution depends on another solution that is smaller in scope and part of the same problem.&lt;br&gt;
To delete files, directories, and subdirectories recursively, we use the command: $ rm -r  (in some cases, root access may be required).&lt;/p&gt;

&lt;p&gt;The -r option is used to delete files recursively. For example, to delete the file tugas1 that we previously created, we can run the command and see that the tugas1 folder and its contents have been deleted successfully.&lt;/p&gt;

&lt;p&gt;Use the command &lt;code&gt;$ rm &amp;lt;file name&amp;gt; to delete files&lt;/code&gt;&lt;br&gt;
Use the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rm -r &amp;lt;directory name&amp;gt;
$ rm -r /home/ta-lim/kuliah/SO/pratikum1/tugas1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to delete directories recursively&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MHkgsWfJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e9obeptgf2io0untfkcr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MHkgsWfJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e9obeptgf2io0untfkcr.png" alt="Image description" width="649" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Access rights
&lt;/h3&gt;

&lt;p&gt;Access rights on Ubuntu Server can be configured through ownership, permission, and group settings on files or directories. Here is a summary of access rights on Ubuntu Server:&lt;/p&gt;

&lt;h4&gt;
  
  
  Ownership
&lt;/h4&gt;

&lt;p&gt;Each file or directory has an owner (user) and an owning group (group).The owner can access and modify the file or directory, and the owning group can have certain access rights.Ownership can be set using the &lt;code&gt;$ chown&lt;/code&gt; and &lt;code&gt;$ chgrp&lt;/code&gt; commands.&lt;/p&gt;

&lt;h4&gt;
  
  
  Permission
&lt;/h4&gt;

&lt;p&gt;Each file or directory has three types of access rights: read, write, and execute. Access rights can be granted to the owner, owning group, and other users.Permissions can be set using the &lt;code&gt;$ chmod&lt;/code&gt; command.&lt;/p&gt;

&lt;h4&gt;
  
  
  Group
&lt;/h4&gt;

&lt;p&gt;Files or directories can be grouped into a group, and access rights can be granted to that group. Users can be added to a group to gain certain access rights.Group settings can be configured using the &lt;code&gt;$ addgroup&lt;/code&gt; and &lt;code&gt;$ usermod&lt;/code&gt; commands.&lt;/p&gt;

&lt;h4&gt;
  
  
  Superuser (root)
&lt;/h4&gt;

&lt;p&gt;The superuser has full access rights to the system.Users with superuser access can configure access rights for other users and the system as a whole. Users can use the &lt;code&gt;$ sudo&lt;/code&gt; command to gain access as the superuser.&lt;/p&gt;

&lt;h3&gt;
  
  
  Change file or directory permissions
&lt;/h3&gt;

&lt;p&gt;Use the chmod command with the format &lt;code&gt;$ chmod [mode][file/directory]&lt;/code&gt;. The mode can be in numeric notation (&lt;strong&gt;e.g. 744&lt;/strong&gt;) or symbolic notation (&lt;strong&gt;e.g. rwxr--r--&lt;/strong&gt;).The numeric and symbolic notations represent the permissions for owner, group, and others, each with a value of 0-7. The order of the permissions is &lt;strong&gt;read (r), write (w), and execute (x)&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example:$ chmod 744 Latihan or $ chmod u=rw,g=r,o=r Latihan
(give read-write permission to owner and read-only permission to group and others)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Jf1n_L48--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wg0ev48mahgz9ap5lziq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Jf1n_L48--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wg0ev48mahgz9ap5lziq.png" alt="Image description" width="455" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Changing Ownership of Files and Directories
&lt;/h3&gt;

&lt;p&gt;Use the chown command with the format &lt;code&gt;$ chown [owner]:[group] [file/directory]&lt;/code&gt;.&lt;br&gt;
Owner is the name of the new owner and group is the name of the new group.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    Example: $ chown lim:lim Latihan 
(change the owner to john and the group to users)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3wGFidj0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lfhbo7ivmlmpveekhcgi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3wGFidj0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lfhbo7ivmlmpveekhcgi.png" alt="Image description" width="457" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Example Case
&lt;/h3&gt;

&lt;p&gt;In a job interview for a System Administrator position, you are asked to create two users that represent your identity (&lt;strong&gt;e.g. user1=first name; user2=last name&lt;/strong&gt;). For each user, create a directory named Ujian1 (&lt;strong&gt;user1&lt;/strong&gt;) and Ujian2 (&lt;strong&gt;user2&lt;/strong&gt;). Then, &lt;strong&gt;create 3 files&lt;/strong&gt; with a size of 100 bytes simultaneously in the Ujian1 directory, and create 3 files with a size of 200 bytes simultaneously in the Ujian2 directory. &lt;strong&gt;Swap the ownership&lt;/strong&gt; of the Ujian1 directory to User2 and vice versa. Then, &lt;strong&gt;set the access permission&lt;/strong&gt; of one file (of your choice) to be readable only by the user and group who own the file, but not readable by other users.&lt;/p&gt;

&lt;h4&gt;
  
  
  Create User, Directory, and  File
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo adduser muhamad (user1)
$ sudo adduser talim (user2)

$ mkdir Ujian1 (user muhamad)
$ mkdir Ujian2 (user talim)

$ touch soal4 soal5 soal6 (user muhamad) 
$ touch soal1 soal2 soal3 (user talim)

$ truncate -s 100 soal4 soal5 soal6
$ truncate -s 100 soal1 soal2 soal3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_PajCqm---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r92v2xgnw6lsk1xy3oux.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_PajCqm---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r92v2xgnw6lsk1xy3oux.png" alt="Image description" width="801" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XQSc3ORQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fyve99w6kmsn09x90x5n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XQSc3ORQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fyve99w6kmsn09x90x5n.png" alt="Image description" width="801" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Swap the ownership directory
&lt;/h4&gt;

&lt;p&gt;The "chown" command in Linux is used to change the ownership of files and directories. Only the root user or a user with sudo privileges can change the ownership of a file or directory. This is because changing ownership can have significant security implications, and only privileged users should be able to make such changes.&lt;/p&gt;

&lt;p&gt;When a file or directory is created, it is assigned an owner and a group. The owner is the user who created the file or directory, and the group is a set of users who have access to the file or directory. The "chown" command allows you to change the owner and group of a file or directory to any other user or group on the system, as long as you have the necessary permissions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo chown talim Ujian1 (set access in dir Ujian1 to user talim)
$ sudo chown muhamad Ujian2 (set access in dir Ujian2 to user muhamad)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--28Gc-gmg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bxlh7xnhj3j0itdsj71l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--28Gc-gmg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bxlh7xnhj3j0itdsj71l.png" alt="Image description" width="470" height="151"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Set access for a file
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ chmod 440 soal1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lsufV_ia--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ck5uhexixjuiqbhg38rl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lsufV_ia--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ck5uhexixjuiqbhg38rl.png" alt="Image description" width="422" height="196"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.geeksforgeeks.org/difference-between-fat32-and-ntfs/"&gt;Difference between FAT32 and NTFS&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/structures-of-directory-in-operating-system/?ref=gcse"&gt;Structures of Directory in Operating System&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>systems</category>
      <category>operations</category>
      <category>management</category>
    </item>
    <item>
      <title>Instalasi Ubuntu Server di Virtual Box Manager</title>
      <dc:creator>ta-lim</dc:creator>
      <pubDate>Wed, 15 Feb 2023 09:12:48 +0000</pubDate>
      <link>https://dev.to/talim/instalasi-ubuntu-server-di-virtual-box-manager-1fbi</link>
      <guid>https://dev.to/talim/instalasi-ubuntu-server-di-virtual-box-manager-1fbi</guid>
      <description>&lt;h2&gt;
  
  
  Untuk tugas mata kuliah sistem operasi
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Unduh file ISO Ubuntu Server dari situs web resmi &lt;a href="https://ubuntu.com/download/server" rel="noopener noreferrer"&gt;Ubuntu&lt;/a&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcnmcgb028n1sjsis794g.png" alt=" " width="800" height="455"&gt;
&lt;/li&gt;
&lt;li&gt;Unduh aplikasi &lt;a href="https://www.virtualbox.org/wiki/Downloads" rel="noopener noreferrer"&gt;Virtual Box Manager&lt;/a&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft0vb7xsbiu9edvzgtrxl.png" alt=" " width="800" height="376"&gt;
&lt;/li&gt;
&lt;li&gt;Buka VirtualBox dan klik "New" untuk membuat mesin virtual baru.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjidqsbl0ezmbvp2ixycs.png" alt=" " width="800" height="460"&gt;
&lt;/li&gt;
&lt;li&gt;Pada layar "Name and Operating System", masukkan nama untuk mesin virtual dan pilih "Linux" sebagai tipe sistem operasi, dan "Ubuntu (64-bit)" sebagai versinya.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvkl48xl7eas8ysys9pb2.png" alt=" " width="800" height="461"&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pada layar "Base Memory", alokasikan jumlah RAM yang ingin Anda berikan ke mesin virtual. Disarankan untuk mengalokasikan setidaknya 1 GB RAM. (pada gambar mengalokasikan sebesar 2 GB RAM)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvuxgh4a5hbc3yo7lg5ax.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvuxgh4a5hbc3yo7lg5ax.png" alt=" " width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pada layar "File location and size", masukkan nama untuk file hard disk virtual, pilih lokasi untuk menyimpannya, dan alokasikan jumlah ruang hard disk yang ingin Anda berikan ke mesin virtual. Disarankan untuk mengalokasikan setidaknya 10 GB ruang hard disk.(Pada gambar mengalokasikan sebesar 20 GB)&lt;br&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F26ffd7x2xmiigvy2wk7m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F26ffd7x2xmiigvy2wk7m.png" alt=" " width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pada tampilan Summary klik "Finish" untuk membuat mesin virtual.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsjdji8h2o8alkokfj4i7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsjdji8h2o8alkokfj4i7.png" alt=" " width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Di VirtualBox Manager, pilih mesin virtual yang baru saja Anda buat dan klik "Settings".&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft8yaqxqpqdnpa0nunsfx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft8yaqxqpqdnpa0nunsfx.png" alt=" " width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pada jendela "Settings", klik "Storage" dan kemudian "Empty" di bawah "Controller: IDE".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Klik pada ikon "CD/DVD" dan kemudian "Choose Virtual Optical Disk File".&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcx0hm8jy9edjbj1vifsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcx0hm8jy9edjbj1vifsk.png" alt=" " width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Telusuri file ISO Ubuntu Server yang Anda unduh pada langkah 1 dan pilih file tersebut.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Klik "OK" untuk menutup jendela "Settings".&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fons1j0nu36lbeqr65rmp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fons1j0nu36lbeqr65rmp.png" alt=" " width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mulai mesin virtual dengan mengklik tombol "Start" di VirtualBox Manager.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ikuti petunjuk instalasi Ubuntu Server untuk menyelesaikan instalasi.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fby19wog2hmoc9g1ucfhl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fby19wog2hmoc9g1ucfhl.png" alt=" " width="800" height="682"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Berikut tampilan akhir pada VirtualBox Manager setelah instalasi Ubuntu server telah selesai&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftlurlvjhnzksu06v73en.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftlurlvjhnzksu06v73en.png" alt=" " width="800" height="687"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>socialmedia</category>
      <category>marketing</category>
      <category>networking</category>
    </item>
  </channel>
</rss>
