0% found this document useful (0 votes)
39 views

Linux Basics: Ansh Bhawnani

This document discusses Linux command line basics, file systems, and user administration. It covers the basics of the command shell interface in Linux, including different shells like Bash. It describes the main Linux file system structure and important directories. It also discusses common Linux file systems like EXT4, NTFS, and FAT, and how file ownership and permissions are managed through users and groups in Linux.

Uploaded by

Mamertopend
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Linux Basics: Ansh Bhawnani

This document discusses Linux command line basics, file systems, and user administration. It covers the basics of the command shell interface in Linux, including different shells like Bash. It describes the main Linux file system structure and important directories. It also discusses common Linux file systems like EXT4, NTFS, and FAT, and how file ownership and permissions are managed through users and groups in Linux.

Uploaded by

Mamertopend
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Module 3

Linux Basics

Ansh Bhawnani
Command Line

Module 3
1. Command Shell
Basics

Module 3
Command Shell Basics

▰ Text-based application for viewing, handling, and


manipulating files on your computer
▰ Other names: cmd, CLI, prompt, console or terminal.
▰ User to Kernel interface
▰ Interface to use operating system services
▰ Read from input devices such as keyboards or from files
▰ The shell gets started when the user logs in or start the
terminal.
4
Command Shell Basics

5
Command Shell Basics

6
2. Windows
Command Line

Module 3
Windows Command Line

▰ Windows has two command shells: The Command shell and PowerShell
▰ Officially called Windows Command Processor, but also sometimes
referred to as the command shell or cmd prompt, or cmd.exe.
▰ Sometimes called ‘DOS prompt’, incorrectly.
▰ PowerShell was designed to extend the capabilities of the Command
shell to run PowerShell commands called cmdlets
▰ You can run Windows Commands and PowerShell cmdlets in Powershell,
but the Command shell can only run Windows Commands and not
PowerShell cmdlets.
8
Windows Command Line

9
Windows Command Line

10
3. Linux Command
Line

Module 3
Linux Command Line

▰ Kali Linux uses the Bourne Again or Bash shell, created for use in the
GNU project, as a successor to the Bourne shell
▰ Bash can also read and execute commands from a file, called a shell
script.
▰ Bash command syntax includes ideas drawn from the Korn shell (ksh)
and the C shell (csh) such as command line editing, command history

12
Linux Command Line

13
Linux Command Line

14
File Systems

Module 3
1. Linux File System

Module 3
Linux File System

▰ A file system is basically a set of rules used to decide how data is


stored and fetched in a storage device, be it a hard drive, flash drive,
or something else.
▰ The entire Linux directory structure starting at the top (/) root
directory.
▰ A specific type of data storage format, such as EXT3, EXT4, BTRFS,
XFS, and so on
▰ Mounting: A mount point is simply a directory, like any other, that is
created as part of the root filesystem. The Linux root filesystem is
mounted on the root directory (/)
17
Linux File System

18
Linux File System

▰ / (root filesystem)
▻ Top-level directory of the filesystem
▻ Contains all of the files required to boot the Linux system before
other filesystems are mounted
▻ Includes all of the required executables and libraries required to
boot the remaining filesystems

19
Linux File System

▰ /bin: The /bin directory contains user executable files.


▰ /boot: Contains the static bootloader and kernel executable
and configuration files required to boot a Linux computer.
▰ /dev: This directory contains the device files for every
hardware device attached to the system
▰ /etc: Contains the local system configuration files for the host
computer.
▰ /home: Home directory storage for user files. Each user has a
subdirectory in /home.
20
Linux File System

▰ /lib: Contains shared library files that are required to boot the
system.
▰ /media: A place to mount external removable media devices
such as USB thumb drives that may be connected to the host.
▰ /mnt: A temporary mountpoint for regular filesystems
▰ /root: It is the home directory for the root user.
▰ /tmp: Used by the operating system and many programs to
store temporary files.
▰ /usr: Shareable, read-only files, including executable binaries
and libraries, man files, and other types of documentation.
21
Linux File System

22
2. NTFS, FAT, EXT

Module 3
NTFS, FAT, EXT

▰ FAT32 (File Allocation Table)


▻ Increases the number of bits used to address clusters
and reduces the size of each cluster.
▻ Supports larger disks (up to 2 terabytes) and better
storage efficiency, 4 GB Max file size
▰ NTFS (New Technology File System)
▻ Windows NT operating system uses for storing and
retrieving files on a hard disk
▻ Linux and BSD have a free and open-source NTFS driver
▻ macOS comes with read-only support for NTFS.
▻ 16 TB max file size, 4KB cluster size 24
NTFS, FAT, EXT

▰ Ext4 (Extended File System 4)


▻ Ext4 supports file-based encryption
▻ File contents, filenames, and symbolic link targets are all
encrypted.
▻ Being used by Linux kernel

25
Linux User
Administration

Module 3
Ownership of Files

▰ User
▻ A user is the owner of the file
▻ The person who created the file
▰ Group
▻ A user- group can contain multiple users.
▻ All users belonging to a group will have the same access
permissions to the file
▰ Others
▻ Everybody else
▻ Neither created the file, nor he belongs to a usergroup
who could own the file 27
Permissions of Files

▰ Read
▻ Authority to open and read a file
▻ Read on directory gives you the ability to lists its content.
▰ Write
▻ Authority to modify the contents of a file
▻ Write on directory gives you the authority to add, remove
and rename files stored
▰ Execute
▻ You cannot run a program unless the execute permission
is set
28
Permissions of Files

29
Changing File Permissions

▰ Absolute (Numeric) Mode


▻ 0 for no permission
▻ 1 for execute
▻ 2 for write
▻ 4 for read

30
Changing File Permissions

▰ Symbolic Mode (for all 3 user types)


▻ + for adding permission
▻ - for removing permission
▻ = sets and overrides permissions

▻ u user/owner
▻ g group
▻ o other
▻ a all
31
HACKING
Is an art, practised through a creative mind.

32

You might also like