🚀 Day 2: Diving into Basic Linux Commands for the #90DaysOfDevOps Challenge! 🚀
Today, I took my first steps into the world of Linux, and I’m excited to share some essential commands that form the backbone of interacting with the Linux operating system. Here’s what I learned:
Basic Commands
- pwd — print/present working directory
- ls(list in series) — list a file &directory
- ls -a to see hidden(.) files
- ll(long list) ls — ltr shows in detail
- date -current date ,time, year, seonds
- date -s used for date set
- cal used to view current month calender
cal -s Displays sunday as the first day of the week
cal -m Displays monday
cal -J Displays Julian dates
cal -y Displays a calender for the year
cal -3 to view 3 months calender (previous,current,next)
- lsusb -usb related information
- lspci — pheripheral connected device information
- clear — to clear /clean the screen
- history — to see the previous command history
- tty — terminal command information
- man — to get detailed information of a command it is well structured
- free -storage is visible
free -h the storage is shown in human readable format
- whoami — to see user
- uname — name of the operating system i.e kernel information
uname -v to known the version of the kernel
uname -a all information about the kernel
- passwd -to change the passwd
- w — which user is logged in
- dmidecode — complete information about system
dmidecode| less basically less is used to read the file
20.who — user & its time
21**.whatis** it provides one line information
22**.echo** — prints message on terminal & also used for file creation
23.rm — -help to known the rm related information
rm -rf r means recursive which first deletes the last file & then deletes last file and then delete one by one .
f means forcefully
v verbose → which shows the process of the recursive deletion
rm -rvf
ex : dir1/dir2/dir3/dir4/file1 → it will first delete the file1 →dir4 →dir3 →dir2 →dir1
Get Jadhav Swati’s stories in your inbox
Join Medium for free to get updates from this writer.
24.du — displays the folder size
- df -hT — displays storage related information
- info — in a descriptive way( very much in detail)
- top — used to see current running process
- diff filename — used to find out the difference between two files
- tac filename — used to reverse the content of the file
- Listing commands
ls option_flag arguments --> list the sub directories and files available in the present directory
Examples:
ls -l-> list the files and directories in long list format with extra informationls -a-> list all including hidden files and directoryls *.sh--> list all the files having .sh extension.ls -i--> list the files and directories with index numbers inodesls -d */--> list only directories.(we can also specify a pattern)
Directoy commands
pwd--> print work directory. Gives the present working directory.cd path_to_directory--> change directory to the provided pathcd ~or justcd--> change directory to the home directorycd ---> Go to the last working directory.cd ..--> change directory to one step back.cd ../..--> Change directory to 2 levels back.mkdir directoryName--> to make a directory in a specific location
Directories (Filesystem hierarchy)
/root — it is the top level directory in linux hierarchy. All other directories are subdirectory of root.
/bin — it contains essential binary executable , basically used for basic system functionality. They are used to change the system booting and functionality.
/boot — this contains files needed for systems boot process such as kernel and boot loader.
/dev — it contains devices files & provides interface for interaction .
/etc — this contains configuration file that consist of various aspect of system, application and services .
/home — it contains local users home directory .
/lib — it contains 34 bit library files.
/lib64–64 bit shared library files.
/media — it is used as a mounting point for removable are such as usb devices.
/mnt — it is used as a temporary mounting point.
/opt — it is the most installed third party software.
/proc — this provides information about currently running software
/sbin — it contains system admin binary executable typically used by root user.
/temp — it is used for temporary used file ,which may be deleted at power off .
/usr — it contains user related files like libraries, binary file etc
/var — variable data file
/srv — service contains service related data
/run — temporary file system , holding data for process since last boot.
/sys — virtual file system which provides information about device , drives & kernel parameters.
Mastering these commands is fundamental for any aspiring DevOps engineer. I’m looking forward to applying these skills as I continue my journey!
Stay tuned for more updates!
#DevOps #Linux #SysAdmin #90DaysOfDevOps #LearnLinux #TechSkills #Automation #CloudComputing


