Из-за периодической блокировки нашего сайта РКН сервисами, просим воспользоваться резервным адресом:
Загрузить через dTub.ru Загрузить через ycliper.com Загрузить через ClipSaver.ruУ нас вы можете посмотреть бесплатно Get Running Services and Their Versions on Linux Efficiently или скачать в максимальном доступном качестве, которое было загружено на ютуб. Для скачивания выберите вариант из формы ниже:
Роботам не доступно скачивание файлов. Если вы считаете что это ошибочное сообщение - попробуйте зайти на сайт через браузер google chrome или mozilla firefox. Если сообщение не исчезает - напишите о проблеме в обратную связь. Спасибо.
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса savevideohd.ru
Discover how to list all active services on Linux and output their respective versions using simple commands and scripts with minimal effort. --- This video is based on the question https://stackoverflow.com/q/73018455/ asked by the user 'takobaba' ( https://stackoverflow.com/u/2106900/ ) and on the answer https://stackoverflow.com/a/73022268/ provided by the user 'ufopilot' ( https://stackoverflow.com/u/4177828/ ) at 'Stack Overflow' website. Thanks to these great users and Stackexchange community for their contributions. Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: Get running services and output the service with versions on linux Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l... The original Question post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license. If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com. --- Get Running Services and Their Versions on Linux Efficiently Managing services on a Linux system is a critical task for system administrators and developers alike. One common requirement is to obtain a list of all currently running services along with their corresponding versions. This guide will guide you through the process, providing you with the necessary commands and scripts, and ultimately saving you time and effort. The Problem: Listing Running Services with Versions When you want to monitor or troubleshoot services on your Linux system, knowing their operational status and the versions running is vital. Manually sifting through service information can be tedious, and it's best to automate this task where possible. This leads us to the question: How can you get a list of running services on Linux and print their associated versions? The Solution: Combining Systemd and RPM Commands To achieve this, we can make use of the systemctl command to list active services and the rpm command to query their versions. Here’s a breakdown of the steps involved: Step 1: List Active Services Start by gathering a list of all active services using the following command: [[See Video to Reveal this Text or Code Snippet]] This command provides a clean output of all currently running services without any additional formatting or pagination. Step 2: Extract Service Names Next, we need to manipulate the output from the command above to fetch just the service names. To accomplish this, we can utilize a combination of bash scripting and tools like awk. Here’s a function that can help: [[See Video to Reveal this Text or Code Snippet]] This function will print only the service names, stripping away irrelevant details. Step 3: Query Service Versions Now that we have the service names, we can loop through each service name and use the rpm command to query its version. Here’s how to do it in a CSV format: [[See Video to Reveal this Text or Code Snippet]] This command will provide an output in the form of: [[See Video to Reveal this Text or Code Snippet]] The grep command filters out services that are not installed. Step 4: JSON Output (Optional) If you prefer the output in JSON format, you can modify the script like this: [[See Video to Reveal this Text or Code Snippet]] This will give you a nicely structured JSON array, which looks like: [[See Video to Reveal this Text or Code Snippet]] Final Thoughts Using the above steps, you can efficiently gather a list of running services and their versions on a Linux machine. Whether you output the results in CSV or JSON format, you streamline the process, making it easier to monitor your system’s services. So, the next time you need this information, remember the combination of systemctl and rpm commands will help you accomplish your task with minimal fuss. Feel free to adapt the scripts provided to better fit your needs, and happy scripting!