Thursday, 12 October 2023

D02


 Introduction to LINUX:

Linux is an operating system, similar to Windows, iOS, and Mac OS. It plays a crucial role in managing hardware resources on computers. Notably, Android, a widely used platform, is built on the Linux OS. The operating system acts as an intermediary, enabling communication between software and hardware, making it essential for software functionality.

Most frequent tasks that you perform on PC is creating, moving or deleting Files

To manage your files , you  can either use

a. Terminal (Command Line Interface - CLI)

b. File manager (Graphical User Interface –GUI) 

WHY LEARN COMMAND LINE INTERFACE?

  • Despite the growing preference for GUI-based systems, the Command Line Interface (CLI) remains highly valuable and extensively utilized in scripting and server administration.
  • It offers greater flexibility and a wider range of options compared to GUI. Additionally, powerful features like piping and stdin/stdout are available in CLI but absent in GUI.
  • CLI simplifies certain tasks that might require navigating through multiple screens in GUI, condensing them into single commands.
  • CLI is resource-efficient, loading quickly and consuming minimal RAM, which becomes significant in resource-intensive situations.

Launching the  cli on ubuntu

Two ways to launch the terminal;

  • Go to the Das and type terminal Or 
  • we can just press CTRL + ALT + T

Once CLI is launched, we would find something as guru99@VirtualBox(seeimage) written on it.

Tilde '~' signs shows that the user in working in the home directory. If we change the directory the sign will vanish. Like in given second image.

While working as root user '#' is displayed.

  • root@VirtualBox:~#

 Present Working Directory 

  • The current working directory is the one that you are now viewing.
  • Upon booting up, the computer automatically logs on to the home directory.
  • We must use the command -pwd (print working directory) to find the directory that we are currently working on.

 Changing Directories 

  • 'cd' is the command to use to change the current directory.
  • The command cd~ is another option.

Moving to Root Directory

  • The '/' symbol in Linux indicates the file system root. Much like Windows' 'c:\'.
  • To access the root directory, type 'cd /'. In Windows, we use the backward slash '\', but in UNIX/Linux, we use the forward slash '/'.
  • The gap between cd and / must be remembered; else, an error message will appear.

Moving to Root Directory
  • Navigate through multiple directories at that same time by specifying its complete path.
  • Moving up one directory level:
  • for navigating up one directory level, try 'cd ..'
Here we use the 'cd ..' command, where the directory is moved up from 'Pelden' directory to /home.

Relative and Absolute Paths
  • There are two paths : 
  1. Absolute path and relative path
  2. Path in computing is the address of a file or folder 
For example -
  • Windows: C:\documentsandsetting\user\downloads
  • Linux: /home/user/downloads

Relative Path
  • Relative path comes in handy when browsing another sub-directory within a given directory.

Accessing Hardware Information 
  • Disk Space Usage :  displays the mounted file system disk usage. Also try out 
  • Memory:  display the RAM and Virtual Memory information. You can also use  
  • CPU Details:  or  display the information related to CPU.
  • Peripheral Component Interconnection(PCI) Devices: , displays the PCI devices list and its information.
  • All above information and more can be viewed with the single command  as well.

 

No comments:

Post a Comment

G01:Client Server Architecture

  G01 Client Server Architecture A central server (host computer) serves as both the source of service requests and the destination for ...