KEMBAR78
Linux Crash Course | PDF | Computer File | Computing
0% found this document useful (0 votes)
38 views4 pages

Linux Crash Course

This document is a crash course on Linux for beginners, covering essential commands and techniques such as using the man command for manuals, remote login via SSH, and file management commands like ls, cp, mv, and rm. It also explains how to utilize the apropos command for searching manuals and provides tips for navigating the file system. Key concepts include creating files and directories, moving and copying files, and understanding the Linux directory structure.

Uploaded by

mamunsirazeee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views4 pages

Linux Crash Course

This document is a crash course on Linux for beginners, covering essential commands and techniques such as using the man command for manuals, remote login via SSH, and file management commands like ls, cp, mv, and rm. It also explains how to utilize the apropos command for searching manuals and provides tips for navigating the file system. Key concepts include creating files and directories, moving and copying files, and understanding the Linux directory structure.

Uploaded by

mamunsirazeee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Crash Course: Linux For Absolute Beginners

Lec1:
$man man : "Show me the manual for the man command."

$man Printf: shows manual for printf command.

$ls –help: meant double dash --help, not a single en dash –) is used in Linux to display the help
information for the ls command.

Lec2:
Remote Login using SSH: ssh username@hostname_or_ip

Lec3:
$apropos : The apropos command is used to search the manual (man) page descriptions for
keywords. It helps you find relevant commands when you don’t know the exact command name.

Syntax: apropos [keyword]

Example: apropos copy

apropos searches a database built by man. If it doesn’t return results, you may need to update the
database with: sudo mandb

$apropos -s: The -s (or --section) option in the apropos command lets you limit your search to a
specific section of the man pages.

Syntax: apropos -s [section_number] keyword

📘 Manual Page Sections in Linux:

Section Description
1 User commands
2 System calls
3 Library calls
4 Special files (e.g., /dev)
5 File formats and conventions
6 Games and screensavers
7 Miscellaneous
8 System administration commands
$apropos –s 1,8 director : will open that matches the keyword “director” in the manual section 1 to 8.
Auto Completion technique: type starting word and press “TAB”.

Auto Suggestion technique: type starting word then press “Space” and press “TAB””TAB”.

Lec4:
Listing Files and Directories:

$ls-la or $ls –a-l:

 ls = list directory contents

 -l = long listing format (detailed view)

 -a = include hidden files (those starting with .)

$ls –l:

Lists directory contents in a long (detailed) format, but does not include hidden files.

$ls –a:

lists all files and directories, including hidden ones, in the current directory.

$ls –alh:

is a very common and powerful way to list all files, including hidden ones, in long, human-readable
format.

File System Tree:

 / (root) is the top-level directory — everything starts here.

 Users’ personal data is stored under /home/username.

 /etc holds system-wide config files.

 /var/log contains system and application log files.

Current Working Directory:


$PWD: Print Working Directory

cd: Change Directory


$cd/var/log

$cd/home/mamun

cd . .

../invoice.pdf: one step up from current directory

../../invoice.pdf: two step up from current directory

Master Tips:

$cd / : take you to root directory.

$cd - : Go to previous directory.

$cd: Go to home directory.

Lec4: Create File & Directories

Create File in working directory: $touch receipt.pdf

Create File in another directory: $touch/home/mamun/ receipt.pdf

Or $touch ../mamun/receipt.pdf

Create a New Directory: $mkdir Receipt mkdir = Make Directory

Copying files:

$cp [Source] [Destination] cp= Copy

$cp receipt.pdf Receipts/

Or $cp receipt.pdf Receipts

$cp receipt.pdf Receipts/ReceiptCopy.pdf : will copy the Receipt.pdf file to same directory with a name
ReceiptCopy.pdf

Copying Directory:

$cp –r [Source] [Destination] -r=Recursive

$cp –r Receipts/BackupOfReceipts/ : Will copy all the sub directories and files of Receipts directory
and save the directory as BackupOfReceipts.

Moving Files: $mv [Source] [Destination] mv= Move

$mv receipt.pdf Receipts/

***Note: Best practice to identify a directory always use a slash(/) as mentioned above line.

Rename a File:
$mv Receipt.pdf oldReceipt.pdf

Rename a Directory:

$mv Receipts/ oldReceipts/

Deleting Files: will delete the specific file

$rm invoice .pdf : will remove/delete invoice.pdf

Deleting Directories: will delete the directory and sub directories.

$rm –r invoices/

You might also like