Linux Basics: Ansh Bhawnani
Linux Basics: Ansh Bhawnani
Linux Basics: Ansh Bhawnani
Linux Basics
Ansh Bhawnani
Command Line
Module 3
1. Command Shell
Basics
Module 3
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
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
▰ /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
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
30
Changing File Permissions
▻ u user/owner
▻ g group
▻ o other
▻ a all
31
HACKING
Is an art, practised through a creative mind.
32