Fundamental of Linux | #Day-2

Fundamental of Linux | #Day-2

Linux Operating system :

  1. Linux is an open-source operating system that manages the communication between the software and hardware of a system. It is developed by Linus Torvalds in 1991.

  2. Kernal: The kernel is a program at the heart of the Linux operating system that takes care of fundamental stuff, like letting hardware communicate with software. It also manages the CPU, Memory, and Peripheral devices.

  3. Boot Loader: A software to manage the booting process of a computer that mostly comes as a splash screen to boot into an os.

  4. Shell : It is an interface among the kernel and user. It can afford the services of kernel. It can take commands through the user and runs the functions of the kernel.

Linux Architecture

Architecture of Linux - javatpoint

Ex : Ubuntu, Debian CentOS, Fedora.

Linux Administration :

Linux Administration is about managing system operations such as :

  1. File Backup and restorations

  2. Disaster recovery

  3. New system Build

  4. Hardware-software and user maintenance.

  5. File system housekeeping

  6. Application installation and configuration

File system hierarchy

In Linux everything is represented as a file including a hardware program, the files are stored in a directory and every directory contains a file with a tree structure. This is called file System Hierarchy.

  • / - This is a top-level directory, if someone says to look in slash directory they refer to the root directory.

  • /root - It is the home directory for the root user

  • /bin - It contains commands used by all users and contains binary executables.

  • /home - It is the home directory for other users

  • /boot - It contains bootable files for Linux

  • /etc - It contains all configuration files

  • /usr - by default software is installed in this directory

  • /sbin - It contains commands used by the only root user (root)

Linux basic Commands

  • pwd ->It shows the present working directory).

  • ls->It shows available files and directory list in the present working directory.

  • uname -> it shows the name of the kernel (OS).

  • uname -r ->it shows version of the kernel OS.

  • cd -> it is used for change the directory.

  • clear ->it is use for clear screen.

  • whoami -> it shows the currently logged in username.

  • history -> it shows the list of previously used commands.

  • date -> it shows time and date.

Create File or Directory :

  • mkdir /abhishek ->For Create single Directory.

  • mkdir dev test prod ->For creating multiple directory.

  • mkdir -p /dev/qa/test/devops -> For create directory path

  • mkdir /student{1..10} for create number of firectory

Create file :

  • touch notes ->create single file with touch commands

  • touch python java react -> Create multiple file

  • touch books{1..10} -> Create number of files

For Copy and Paste :

  • cp -> cp command is use for copy and paste file or directory.

Syntax:

cp <option> <source> <destination>

options

-r For recursive

-v for verbose

-f for forcefully

For remove file & directory

  • rm -rvf india/pune -> For delete file or directory

  • vi/vim (create & edit file)

User Management

  • useradd abhishek ->For create user account

  • grep:1000:1001: :/home/abhishek:/bin/bash

  • passwd abhishek -> For create use account password

  • su abhishek -> For switch user account

  • exit -> For logout from user account

Conclusion :

Thanks for reading this blog these are some basic linux command .