Hi, in centos 7 :1. Change your server name to your name, verify and display after change. 2. Display all running processes in Linux system with its pid and child process. 3. What is the difference between unit configuration files type. 4. shows all systemd options that can be configured in the samba.service unit 5. Open configuration file bluetooth unit, write this info: wanted by , Befor ,execstart, 6. Check if is any systemd wants when starting graphical target 7. Shows detailed status information about services. 8. Shows all services that have failed.
Assistant
To change the server name in CentOS 7, you need to modify the hostname file. Open the terminal and execute the following command:
shell
sudo hostnamectl set-hostname your_new_name
To verify the change, execute:
shell
hostnamectl
To display all running processes in a Linux system along with their process IDs (PIDs) and child processes, you can use the ps command:
shell
ps -ef --forest
In CentOS 7, unit configuration files are used by systemd to define and manage various units, such as services, targets, timers, etc. The main types of unit configuration files are:
Service unit files: Used to define and control system services.
Target unit files: Sets of dependencies and conditions for running a set of services.
Timer unit files: Used to configure systemd timers.
Mount unit files: Used to define mount points for file systems.
Socket unit files: Configures system sockets for inter-process communication.
Device unit files: Used to control device dependencies and behavior.
Path unit files: Configures path-based activation of systemd units.
Automount unit files: Used to configure automatic file system mounting.
To show all systemd options that can be configured in the samba.service unit, you can use the systemctl show command:
shell
systemctl show samba.service
To open the configuration file for the Bluetooth unit and add the desired information (wanted by, before, execstart), you can use a text editor such as nano or vi. The configuration file for the Bluetooth unit is typically located at /etc/systemd/system/bluetooth.target.wants/bluetooth.service.
For example, to open the file using nano, execute the following command:
To check if there is any systemd service that wants to start when the graphical target is started, you can use the systemctl list-dependencies command. Execute the following command to get a list of units that "want" the graphical target:
To show detailed status information about services, use the systemctl status command followed by the service name. For example, to get detailed status information about the httpd service:
shell
systemctl status httpd
To show all services that have failed, use the systemctl command with the --failed option: