This is the 16th day of my participation in the August More Text Challenge

Here are my study notes for learning Linux from the ground up, which will be updated later.

Record their own technology growth, also hope to share with you, welcome to follow ~

This is a study note for Linux for Developers on Coursera

Learning goals

  • Describes available methods and options for installing Linux distributions.
  • Define the roles of the packaging system and understand the main commands used to install, dismantle, update, and upgrade components and the entire system.
  • Discuss the features of user home directories and know where they are located.
  • Find the various log files that monitor and record system activity.
  • Explains the relationship between users and groups on unix-like operating systems.
  • Add, delete, and modify user account properties.
  • Add, delete, and modify group attributes for user accounts.
  • Check and set read/write/execute access to files, noting ownership and group membership.
  • Describes the role of user root and the usage of su and sudo.

We will discuss the concept of groups. Each user belongs to one or more groups. A group is a group of users with related responsibilities, tasks, and resources. For example, how to access files on a group basis, not just individual users. In this context, we will discuss how to set access and file permissions by user and group. Finally, we’ll discuss the importance of so-called superusers, and we’ll distinguish between su and sudo commands. The su command allows users to do all the things superusers can do, sudo is more secure and better auditing, and restricts upgrade permissions to just one or a group of commands.

I. System management

1. System installation and graphical package management

Because they have been installed before, so skip

2. Use Yast to manage software packages

Use the GNOME interface to manage software packages on openSUSE. The basic tool for doing this is called YaST, which stands for another setup tool that is available on all SUSe-based systems. So, if I click on the upper right corner here, and then click Settings, you’ll see ugly at the very bottom, but you’ll see the YaST icon. Of course, it wants me to have root privileges. Therefore, I will enter the root password. However, YaST does more than just control package management; it is the basic interface for all system administration.

3. Use RPM to manage software packages

All Linux distributions group software into packages that can be defined as collections of files and subdirectories that make up the product.

If you install all the software on your system using a package management utility, it becomes easier and more stable to install, remove, check for software integrity, and upgrade. Of course, there are other files on the system, such as configuration files and user data, which are usually located outside of the wrapper system or modified by the system administrator based on their original contents.

RPM will install the development kit associated with the asynchronous I/O library on Red Hat-related systems. We’ll soon show you how to perform these operations on Debian derived distributions using DPKG and apt-get. However, this will fail if the actual library itself is not installed. Therefore, you must install them in the correct order, or at the same time.

Type “RPM -qa” to query and view all software packages on the system.

RPM is not in use

Then, we’ll grep to find the bzip2 package

4. Use DPKG to manage software packages

Debian packaging system DPKG or D-package. So, to get a list of all the packages on this system, I can simply type “DPKG –list.” And I just typed it in “less”.

The DPKG command is a Debian Linux utility for installing, creating, and managing software packages. When there is no network, the DPKG command is commonly used to install software locally without considering dependencies

5. Use yum to manage software packages

Install yum in Ubuntu

2. Users and groups

1. User and group basis

Linux assigns an account to each user. Multiple users form a group to share resources and manage resources.

New user (already practiced) :

$ sudo /usr/sbin/useradd bjmoose
$ sudo passwd bjmoose
Copy the code

Delete a user:

$ sudo /usr/sbin/userdel bjmoose
Copy the code

Adding a new group is done using groupAdd:

$sudo /usr/sbin/groupadd anewgroup $sudo /usr/sbin/groupadd anewgroup $sudo /usr/sbin/groupadd anewgroupCopy the code

Add a user to an existing group using usermod. For example, you first look at which groups the user already belongs to:

bjmoose : bjmoose
Copy the code

Then add a new group:

$ sudo /usr/sbin/usermod -aG anewgroup bjmoose
$ groups bjmoose
bjmoose: rjsquirrel anewgroup
Copy the code

2. User root, su, and sudo

The su command is used to switch to the root user mode

Sudo: Temporarily switch to superuser mode to enforce superuser privileges. When prompted for a password, it will be the password of the current user, not the password of the super account. However, there is a time limit, Ubuntu defaults to 15 minutes at a time. Su: Switch to user mode. When you are prompted to enter the password, the password is the password of the user after the switch. The password is su account name. If no account is added, the system uses the root account by default and the password of the super account is the same. There is no time limit. **sudo -i: This command can be used to frequently execute certain privileges that only the superuser can execute without entering a password every time. If you are prompted to enter the password, the password is the password of the current account. There is no time limit. After the command is executed, the prompt changes to # instead of $. To logout of a normal account, you can run exit or logout. The user required to execute this command must be in sudoers

Now that you’ve seen this, why not give it a thumbs up