Nothing Special   »   [go: up one dir, main page]

DEV Community

Cover image for My First Week With Linux
Prashant Pal
Prashant Pal

Posted on

My First Week With Linux

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:

  1. /home:- This folder contains home🏡 directories of all non root users.
  2. /bin:- Binaries, contains executables for most common user commands.
  3. /sbin:- System Binaries, contains system relevant files/programs that admin use (super use privilege).
  4. /lib:- Library📚, contains essential shared libraries that files/programs from /bin and /sbin use.
  5. /usr:- User👤, this is used for user home directories.
  6. /opt:- Optional, contains 3rd party programs you install.
  7. /boot:- Booting, contains files required for booting.
  8. /etc:- Etcetra, contains configuration for system apps.
  9. /dev:- Devices, location for device files like webcam, keyboard, etc.
  10. /var:- Variable, contains files to which the system writes data during the course of its operation.
  11. /temp:- Temporary, contains temporary resources required for some process.
  12. /media:- Removable media.
  13. /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.

  1. pal:- First is username. It shows your username in my case its pal.
  2. pal-ubuntu:- Second is computer name. It shows your computer name in my case its pal-ubuntu.
  3. ::- It is separator.
  4. $:- 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😇.

  1. pwd:- Print working directory. It shows current directory.
  2. ls:- List. It shows the list of files inside a directory.
  3. cd:- Change directory. It helps in navigating from one directory to another.
  4. mkdir:- Make directory. Make folder.
  5. touch:- Create files.
  6. rm:- Removes files/folders.
  7. clear:- Clears the terminal.
  8. mv:- Move flies or used to rename it.
  9. cp:- Copy files.
  10. cat: Displays the file content.
  11. 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).

  1. sudo apt search:- To search the existing package.
  2. sudo apt update:- To update the package.
  3. sudo apt install:- To install the package.
  4. 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 -

  1. https://www.freecodecamp.org/news/the-linux-commands-handbook/#heading-the-linux-man-command
  2. https://www.freecodecamp.org/news/sudo-apt-get-update-vs-upgrade-what-is-the-difference/
  3. 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)