Skip to content

Review hay nhất

Review chất nhất

Menu
  • Trang chủ
  • Cẩm nang
  • Thủ thuật
  • Game
  • Hỏi đáp
  • Điều khoản
  • Liên hệ
Menu

How to Manage Startup Applications on Ubuntu

Posted on Tháng Hai 9, 2023

Nội dung chính

  1. Start Applications at Startup Utilizing systemd
  2. Utilizing GNOME’s Startup Purposes on Ubuntu
    1. Delay Startup Applications on Ubuntu
  3. Start Applications at Ubuntu Startup Utilizing cron Jobs
  4. Allow Crucial Applications to Start at Startup on Ubuntu

We frequently discover ourselves launching most ink applications immediately, immediately after logging into our techniques. It’s a time-consuming course of to manually {search} and start every of these applications each date and time Ubuntu boots ngoc.


A few of the Linux applications are set to start at startup. Nevertheless, it is usually potential to set your {favorite} applications, script, or instructions to run routinely when Ubuntu begins ngoc.


Start Applications at Startup Utilizing systemd

systemd, often known as system or service supervisor, is the primary course of that begins when Ubuntu boots. A systemd service is often included with series Linux applications by default.

With systemd, you too can configure your applications to start routinely when your system boots. You should utilize the systemctl command to handle the systemd companies.

To verify suppose the systemd unit file exists on your program, use the next command:

 systemctl list-unit-files | grep  

Let’s say you need to routinely celebration Apache at system startup. Use the next command to verify suppose a systemd unit file exists for it:

 systemctl list-unit-files | grep apache2 

Suppose it exists, you will note an output like this:

list systemd unit files

Now, to set Apache to start routinely on startup, run:

 sudo systemctl allow apache2 

To confirm suppose the Apache service is enabled to run on startup, use the next command:

 sudo systemctl is-enabled apache2 

The output ought to lost enabled suppose the service is ready to run routinely on system startup.

check service status-1

To scars a program from operating routinely when Ubuntu boots, disable its service utilizing:

 sudo systemctl disable apache2 

Suppose a most ink program doesn’t ship with a systemd unit (system service), you may construct its systemd unit file to run it on system startup. To construct a unit file, as an example review.service, run the next command:

 sudo nano /lib/systemd/system/review.service 

Then, add the next strains of code within the unit file. Ensure to {change} the worth of the ExecStart directive by including the trail to this system that you simply desire to run at startup.

Along with a program, you too can run a command or a script at startup by specifying its path within the ExecStart directive.

 [Unit]
Expression=It is a review service file.

[Service]
Kind=easy
ExecStart=

[Install]
WantedBy=multi-user.goal

As soon as executed, {save} and {close} the unit file.

Then, assign this unit file the mandatory permissions:

 sudo chmod 644 /and so forth/systemd/system/review.service 

Now the systemd unit file is created and you might be able to handle your program at startup utilizing the instructions described above.

Utilizing GNOME’s Startup Purposes on Ubuntu

One other technique to start frequently-used applications at startup is to make use of GNOME’s Startup Purposes. You’ll be able to start it from the functions menu by urgent Exceptional and typing “startup functions.” Or you may start it by urgent Alt + F2 and typing the next command within the Run a Command dialog ribs:

 gnome-session-properties 
gnome session properties

This can start the Startup Purposes Preferences window the place you will note a listing of applications already set to run at startup.

So as to add a brand new program to the record, {click} Add. This can open the Add Startup Program window.

Add startup program

Within the Political name discipline, kind a political name for this system you need to add. Then within the Command discipline, present the prosperous path to this system’s executable binary.

To seek out the prosperous path to this system, use the which command adopted by this system political name. As an example, to seek out the executable binary for Slack, the command can be:

 which slack 

Alternatively, you may {click} Browse and find this system executable. It’s also possible to add any slack associated to this system, though it’s non-obligatory. As soon as executed, {click} Add.

You’ll now see this system listed within the startup applications record. The chosen applications will routinely celebration whenever you check in to your Ubuntu machine.

Startup applications list

Delay Startup Applications on Ubuntu

There could be some functions you need to start routinely at startup, {but} you don’t want them immediately, immediately after login. You’ll be able to add a delay in launching these functions therefore revelation of them do not celebration on the similar date and time. This may also reduce the load in your laptop.

Within the Startup Purposes Preferences window, choose this system you need to delay and {click} {Edit}. Within the Command discipline, add sleep x earlier than the command, the place x is the quantity of date and time (in seconds) to adoration earlier than {opening} the apply.

Let’s say you need to celebration Slack 120 seconds after the system startup, therefore you’d add:

 sleep 120; slack 
delay startup program

To scars a program from the startup applications record, start Startup Purposes Preferences window, choose the apply, and {click} Scars.

Start Applications at Ubuntu Startup Utilizing cron Jobs

A cron work in Linux gives a technique to schedule applications, instructions, or scripts to routinely run at specified instances or intervals. Utilizing cron jobs, you too can run an Ubuntu program routinely at system startup with none hand foot interplay.

cron jobs are outlined as entries within the crontab file. Don’t {edit} the crontab file instantly utilizing any method editor. As a substitute, use the next command to {edit} it:

 crontab -e 

Select the editor by which you need to {edit} the crontab file. Then, so as to add the cron work that runs after startup, use the next syntax:

 @reboot  

As an example, the next cron work tells the system to verify the disk house and {save} the output within the ~/disk-space.txt file after the system boots:

 @reboot df -h >> ~/disk-space.txt  

{Save} the crontab file and exit.

To scars a program from operating when Ubuntu begins, merely scars its cron work entry from the crontab file.

Allow Crucial Applications to Start at Startup on Ubuntu

Having your {favorite} applications already open ngoc on startup may be all ink saving and saving as you may celebration utilizing them immediately after logging in to your system. Nevertheless, too many startup applications can lengthen the boot course of.

Subsequently, it is strongly recommended to allow solely the mandatory applications on startup and disable sometimes used applications which can be enabled by default.

Trả lời Hủy

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Bài viết mới nhất

  • How to Share Your Live Location on WhatsApp
  • Bluetti AC300: The Portable Power Station that Packs a Punch
  • Machine Learning vs. Artificial Intelligence: What’s the Difference?
  • 7 Reasons Why Reddit Is the Best Social Media Platform Around
  • 8 Common Remote Control Issues and How to Troubleshoot Them

Chuyên mục

  • Cẩm nang
  • Game
  • Hỏi đáp
  • Thủ thuật
  • Wikipedia

Share mạng xã hội

  • Facebook
  • Twitter
  • Instagram
  • Pinterest
  • LinkedIn

©2023 Review hay nhất | Design: Newspaperly WordPress Theme