I started learning📖📖 Linux last week. It's been exciting🤗 and a bit overwhelming as I've explored file systems, the terminal, and basic commands. Here's what I've learned so far.
Linux File System
Linux have hierarchical tree🌲 structure. There is one root folder and in that folder there are other different folders. Each folder contains different files. Here is the list of folders:
- /home:- This folder contains home🏡 directories of all non root users.
- /bin:- Binaries, contains executables for most common user commands.
- /sbin:- System Binaries, contains system relevant files/programs that admin use (super use privilege).
- /lib:- Library📚, contains essential shared libraries that files/programs from /bin and /sbin use.
- /usr:- User👤, this is used for user home directories.
- /opt:- Optional, contains 3rd party programs you install.
- /boot:- Booting, contains files required for booting.
- /etc:- Etcetra, contains configuration for system apps.
- /dev:- Devices, location for device files like webcam, keyboard, etc.
- /var:- Variable, contains files to which the system writes data during the course of its operation.
- /temp:- Temporary, contains temporary resources required for some process.
- /media:- Removable media.
- /mnt:- Mount, temporary mount points.
Note:- "." is used for hidden files and folders.
I'm not saying that I learn these, its for just understanding like whats inside that folder. This is only for reading.
Linux Terminal And Basic Commands
When I opened the terminal it shows "pal@pal-ubuntu:~$" so I searched about it and here's what i learned.
- pal:- First is username. It shows your username in my case its pal.
- pal-ubuntu:- Second is computer name. It shows your computer name in my case its pal-ubuntu.
- ::- It is separator.
- $:- It represent regular user, # is used for root user.
For basic commands I make sure to learn📕 those only which are mostly used. It's better to type commands in terminal on your own and experiment it. Don't learn all commands at once because it makes no sense. Learn as you go😇.
- pwd:- Print working directory. It shows current directory.
- ls:- List. It shows the list of files inside a directory.
- cd:- Change directory. It helps in navigating from one directory to another.
- mkdir:- Make directory. Make folder.
- touch:- Create files.
- rm:- Removes files/folders.
- clear:- Clears the terminal.
- mv:- Move flies or used to rename it.
- cp:- Copy files.
- cat: Displays the file content.
- sudo:- Allows regular users to run programs with the security privileges of the super use or root.
Note:- There are different tags with some commands for eg. ls,rm,mv,etc. I learn them simply by searching it on google and take help from ChatGpt. I suggest experiment those commands with all tags to get better understanding of how command works.
Now Time To Install Apps
After having some terminal knowledge I want to install apps for my new os because its too empty😅. In linux there are different types of package manager, for ubuntu by default there is apt(Advanced Package Tool).
- sudo apt search:- To search the existing package.
- sudo apt update:- To update the package.
- sudo apt install:- To install the package.
- sudo apt remove:- To uninstall the package.
Note:- For limited view on screen while installing the package you can add get eg. sudo apt-get install this will show limited view. But apt is more user friendly.
Well there is more, you can install packages by different ways. First one I have discussed above, second is by using default store in Ubuntu, and the third one is snap. Snap is a bundle of app and its dependencies. Snap store provides a place to upload snap.
Important thing is snap takes more space on disk and its third party which means you should be careful while using it.
Resources
Here is some articles which I read -
- https://www.freecodecamp.org/news/the-linux-commands-handbook/#heading-the-linux-man-command
- https://www.freecodecamp.org/news/sudo-apt-get-update-vs-upgrade-what-is-the-difference/
- https://labex.io/courses/linux-basic-commands-practice-online
You can search videos on youtube but I think reading helps you a lot, but it takes time.
It Continues.....
After one week of learning Linux, I feel much more comfortable😌 with the terminal, file systems, and package management. While I still have a long way to go📈, this foundational knowledge is making Linux feel less intimidating every day.
In the coming week, I plan to dive🤿 deeper into shell scripting and understanding permissions in Linux. I’m excited to see how these building blocks will help me automate tasks and manage my system more efficiently.
Well I want to start my Devops journey and I think this is the starting point of it. I can't give too much time to learn linux, but I can learn it more deeper while doing real projects and challenges that will I face.
Top comments (0)