Quick Start Guide to Linux

Quick Start Guide to LinuxFollow the Embedded Learning Station to get more fresh hot topics

Quick Start Guide to Linux

Common operating systems include Linux, Unix, Windows, and Mac OS. More people are familiar with Windows, while Unix and Mac are almost unheard of, and Linux is just a name to many. Indeed, for non-professionals, Windows is sufficient for all needs, and Linux seems almost non-existent in daily life. So, what are the uses and advantages of Linux?

01
What is Linux?

Linux is a free and freely distributable Unix-like operating system. It is a multi-user, multi-tasking operating system that supports multi-threading and multi-CPU. It can run major UNIX tools, applications, and network protocols, supporting both 32-bit and 64-bit hardware. Linux inherits the network-centric design philosophy of Unix and is a stable multi-user network operating system.

02
Applications of Linux

2.2.1. Applications in Personal Desktop:

Those who are familiar with Linux know that the desktop has always been its weak point. In the past, it was suppressed by Windows due to its simple interface, complex operations, and fewer applications. However, in recent years, the rise of excellent environments like Ubuntu, along with increased support from major hardware manufacturers and developers’ reliance on Linux, has gradually increased Linux’s market share in personal desktops;

2.2. Server Field:

Due to its free, stable, efficient, and secure nature, along with no concerns about commercial copyrights, the Linux server market has developed rapidly, especially in high-end applications where large website servers are often based on Linux;

2.3. Embedded Field:

In recent years, Linux has seen rapid development in embedded systems. Due to its open-source nature, powerful features, reliability, flexibility, and strong stability, it supports various graphical user interfaces and widely supports microprocessor architectures, hardware devices, and communication protocols, making it suitable for embedded development;

03
Detailed Characteristics of Linux:

3.1. High Modularity:

The Linux kernel is divided into process scheduling, memory management, inter-process communication, virtual file systems, and network interfaces. Modules are independent and can be trimmed according to user needs, facilitating embedded development;

3.2. Open Source:

Users can freely use the Linux source code and modify or optimize it based on application needs during development. The open-source nature is particularly important for embedded development. Additionally, resources on Linux are constantly increasing, making secondary development easier for developers;

3.3. High Security and Reliability:

The Linux kernel is efficient and stable, proven by extensive use in various fields;

3.4. Extensive Hardware Support:

Linux supports various microprocessor architectures, including X86, ARM, MIPS, etc. It has an exceptionally rich set of drivers, supporting mainstream hardware devices and the latest hardware technologies, further promoting Linux’s use in embedded systems;

3.5. Excellent Development Tools:

Linux provides developers with a complete toolchain (ToolChain), making it easy to debug at all levels from the operating system to application software, unlike traditional embedded development that often requires expensive online simulators for debugging;

3.6. Network and File System Support:

Linux supports various standard internet network protocols and is easily portable to embedded systems. Currently, Linux supports almost all mainstream network hardware, protocols, and file systems (Ext2, FAT32, romfs, etc.), making it a good platform for data backup and synchronization, laying the foundation for development;

3.7. Fully Compatible with UNIX:

Currently, Linux tools and utilities can perform all functions of UNIX.

04
How to Learn Linux?

The above provides a general understanding of Linux. Now that we know its advantages, how should we learn this new content? Of course, we cannot rush; we can only proceed step by step, slowly understanding, learning, and applying.

4.1. Linux File System Structure:

4.1.1. Partitions and Directories:

Microsoft Windows operating system identifies several partitions on the hard drive with symbols like A:, B:, C:, D:, etc. When accessing files, it is essential to know which disk and which directory they are in. In contrast, the file organization model in Linux resembles an inverted tree, which is significantly different from the Windows file system. All storage devices act as subdirectories of this tree. When accessing files, you only need to determine the directory without considering the physical storage location.

In Windows, the directory structure belongs to the partition; in Linux, the partition belongs to the directory structure.

To access file resources uniformly, Linux treats all hardware as files (everything is a file in Linux).

4.1.2. Understanding Basic Directories:

/bin: bin is the abbreviation for binary.

/boot: contains programs needed during system startup.

/dev: includes all external devices used in the Linux system.

/etc: stores various configuration files and subdirectories needed for system management.

/lib: stores the system’s dynamically linked shared libraries.

/home: the main directory for ordinary users.

/root: the main directory for the root user (superuser).

And so on;

4.3. Using Basic Commands:

Who am I? Where am I? What do I have? Where am I going?

whoami pwd ls cd

① pwd is used to display the current location of the user in the file system. This command has no options or parameters, and the result shows the absolute path name.

Quick Start Guide to Linux

② ls [options] [files_or_dirs]

eg:

ls -a displays all files and directories (ls treats files or directory names starting with “.” as hidden and will not list them)

Quick Start Guide to Linux

ls -l lists file types, permissions, file sizes, and other information in detail, in addition to the file names.

Quick Start Guide to Linux

ls -R displays all files in the directory.

Quick Start Guide to Linux

……

③ cd

Absolute path or relative path

cd /home/farsight/project

cd project/docs

Return to the previous directory:

cd ..

Return to home directory:

cd

Return to the last working directory:

cd –

……

Summary: Commands are fundamental to operating Linux, and there are many more that are not listed here for everyone to explore. Beginners need to know that functions achievable in Windows generally require commands in Linux, such as copy (cp), move (mv), create directory (mkdir), etc. Commands are the keys to using Linux, and each key corresponds to a different door; thus, although memorizing them is difficult, mastering commands is the basic skill for getting started.

4.4. Understanding File Types and Permissions:

Quick Start Guide to Linux

File Permissions:

To protect files, the Linux system provides a file access control method. All users are divided into three identities: file owner (user), group users (group), and other users (other). Each type of user can have read (r), write (w), and execute (x) rights for a file;

Quick Start Guide to Linux

05
Conclusion

This concludes the current content. The knowledge points may not be many, but they are sufficient for newcomers to learn for a while. Having mastered the above content provides a general understanding of Linux and offers a direction for learning. Additionally, there are still beginner topics like compilation environments, editors, process management, shell scripts, and efficient file processing commands that have not been listed, so I encourage everyone to explore those on their own.

If you have any questions, please leave a message for Teacher Xiao Xi

Xiao Xi is waiting for you to chat~

Quick Start Guide to Linux

Leave a Comment