Basic Linux Tutorial
Introduction – What is it? Why to learn? Linux installation directory structures Boot process Run levels in Linux Desktop Environments Different shells BASH Internal and External Commands Basic Linux Commands Important files and directories in Linux Environmental and Shell Variables Command history in Linux Character classes in Linux Text editors vim nano Searching files Creating new files Viewing File Contents File commands File permissions and ownership WildCards (Globbing) in files File compression Directory commands xargs command in Linux Comparing files Searching patterns using grep command Translating the characters using tr command Extracting data using cut command Stream editing using sed command Data extraction and reporting using awk command Sorting the file or string input uniq command in Linux Difference between grep, tr, cut, sed and awk commands Hardware commands Hard disk and memory space commands Working with Processes Managing Jobs Working with cron jobs Service command in Linux Network commands Managing Users and Groups Other Popular commands Standard streams and Redirection Pipes Package Managers in Linuxdisk commands in linux shell
Here is the list of hard disk and file system commands in Linux.mount and unmount command
mount command is used to mount the file system in Linux. For example if you want to access the files from USB drive, you will have to first mount the file system from USB drive in the Linux System. Below example shows how to mount a file system on specific directory.
$ mount <file-system> <mount-directory>
You can also modify “/etc/fstab” file to mount the file system. “fstab” stands for file system table. This file contains entries for all mounted file systems.df command
“df” command stands for disk free. As the name indicates, it displays how much space is used by specific file system. It also shows how much space is available on specific file system. To display the size in human readable format (MG,GB,TB etc), you can use below command.
df -h
du command
“du” stands for disk usage. This command is used to display the space occupied by specific file or a directory. For example – below command will display the space occupied by /etc directory and all files and sub-directories in it. “-h” will display the usage in human readable format (MB, GB,TB etc) and “-c” will display the total usage in the end.
du -hc /etc
Finding the size of each directory as well as file
$ du -ah
Finding the size of entire directory
$ du -sh
Finding the size of all files and directories in only current directory
$ du -ah -maxd 1
free command
free command is used to show the details of RAM in Linux. By default RAM is displayed in KB. But you can use below commands to show the RAM in MB, GB, TB etc.
free -m
free -g
free -t
quota command in Linux
quota command is used to manage the disk quota of an user or group. Assume that you set up 15 GB as hard limit quota and 14 GB as soft limit quota with grace period as 10.- Hard limit – With 15 GB as hard limit quota, user will not be allowed to store any more files after 15 GB space is used.
- Soft limit – With 14 GB as soft limit quota, user will be given warning messages after disk usage exceeds 14 GB
- Grace period – Grace period allows you to store files even though you have crossed hard limit.
Getting disk information of the system
You can use lshw command to get disk information. As you can see there are 2 types of disks attached to the system – /dev/cdrom (DVD reader) and /dev/sda (ATA Disk)

Web development and Automation testing
solutions delivered!!