如何在 Linux Mint 中启动时运行命令?

如何在 Linux Mint 中启动时运行命令?

我的计算机有一个问题,由于某种原因 Linux Mint 在启动时无法启动网络管理器。为了解决这个问题,每当我重新启动 Linux 时,我都必须在终端中输入“sudo service network-manager restart”才能访问互联网。这当然会让人恼火!这是我尝试过的:

  • 把命令放在rc.local中,从来没有起作用。

  • 按照此指导对于 crontrab。

  • 将其添加为启动应用程序中的自定义命令:“sudo service network-manager restart”

  • 在启动应用程序中添加自定义命令:“usr/bin/shortcut”该快捷方式指向 /usr/local/bin/nameofile 我还创建了 root 拥有的链接和文件,但由于某种原因仍然需要 sudo 密码。

我很确定问题是当它运行命令时,它需要 sudo 密码,它当然不会获得该密码,因此不会运行。我认为让 root 拥有的文件将使其不需要 sudo 密码。

编辑:我已经给出了 sudo 命令:“sudo service network-manager restart”,不需要密码,这是一大步,因为当我重新启动并登录时,会出现输入 sudo 密码的提示,这意味着代码是在启动时运行。

输出journalctl -u NetworkManager --no-pager -S today

-- Logs begin at Sat 2021-05-01 10:37:52 CDT, end at Wed 2021-08-11 16:23:31 CDT. --
Aug 11 00:06:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628658382.3406] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 00:06:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628658382.3407] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 00:06:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628658382.3407] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 00:06:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628658382.3407] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 00:23:55 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628659435.4100] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 00:23:55 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628659435.5638] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 00:36:14 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628660174.4551] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 00:36:14 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628660174.4552] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 00:36:14 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628660174.4552] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 00:36:14 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628660174.4552] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 00:54:15 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628661255.4092] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 00:54:15 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628661255.7150] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 00:59:35 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628661575.4093] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 00:59:38 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628661578.4902] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 01:08:11 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628662091.9708] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 01:08:11 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628662091.9709] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 01:08:11 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628662091.9709] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 01:08:11 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628662091.9709] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 01:19:58 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628662798.4096] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 01:19:59 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628662799.8585] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 01:35:42 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628663742.3801] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 01:35:42 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628663742.3802] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 01:35:42 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628663742.3802] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 01:35:42 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628663742.3802] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 02:04:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628665462.3255] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 02:04:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628665462.3256] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 02:04:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628665462.3256] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 02:04:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628665462.3256] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 02:35:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628667322.3228] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 02:35:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628667322.3229] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 02:35:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628667322.3229] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 02:35:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628667322.3229] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 03:08:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628669302.3587] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 03:08:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628669302.3587] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 03:08:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628669302.3588] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 03:08:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628669302.3588] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 03:35:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628670919.4094] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 03:35:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628670919.6944] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 03:40:26 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628671226.7520] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 03:40:26 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628671226.7521] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 03:40:26 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628671226.7521] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 03:40:26 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628671226.7521] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 03:40:39 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628671239.4091] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 03:40:39 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628671239.7311] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 04:11:42 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628673102.3223] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 04:11:42 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628673102.3224] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 04:11:42 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628673102.3224] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 04:11:42 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628673102.3224] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 04:43:02 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628674982.3222] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 04:43:02 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628674982.3222] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 04:43:02 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628674982.3222] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 04:43:02 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628674982.3223] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 05:10:59 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628676659.4093] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 05:10:59 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628676659.7671] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 05:15:59 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628676959.4544] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 05:15:59 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628676959.4545] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 05:15:59 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628676959.4545] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 05:15:59 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628676959.4545] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 05:16:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628676979.4097] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 05:16:27 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628676987.9253] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 05:16:46 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628677006.4099] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 05:16:52 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628677012.6844] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 05:47:32 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628678852.3222] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 05:47:32 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628678852.3223] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 05:47:32 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628678852.3223] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 05:47:32 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628678852.3223] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 05:52:09 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628679129.4101] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 05:52:09 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628679129.6392] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 06:17:52 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628680672.4609] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 06:17:52 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628680672.4610] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 06:17:52 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628680672.4610] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 06:17:52 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628680672.4610] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 06:32:29 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628681549.4100] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 06:32:31 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628681551.9421] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 06:37:50 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628681870.4102] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 06:37:50 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628681870.5527] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 06:43:10 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628682190.4099] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 06:43:12 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628682192.7661] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 06:48:32 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628682512.4095] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 06:48:35 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628682515.1114] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 06:48:53 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628682533.4092] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 06:48:55 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628682535.7771] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 06:49:31 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628682571.2551] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 06:49:31 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628682571.2551] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 06:49:31 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628682571.2551] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 06:49:31 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628682571.2551] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 06:54:14 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628682854.4097] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 06:54:14 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628682854.7552] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 07:20:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628684422.4312] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 07:20:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628684422.4312] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 07:20:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628684422.4313] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 07:20:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628684422.4313] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 07:52:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628686342.3226] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 07:52:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628686342.3227] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 07:52:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628686342.3227] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 07:52:22 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628686342.3227] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 07:54:34 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628686474.4096] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 07:54:34 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628686474.5508] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 08:23:12 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628688192.3225] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 08:23:12 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628688192.3226] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 08:23:12 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628688192.3226] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 08:23:12 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628688192.3226] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 08:24:54 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628688294.4093] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 08:24:57 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628688297.5668] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 08:51:08 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628689868.8657] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 08:51:08 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628689868.8658] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 08:51:08 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628689868.8658] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 08:51:08 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628689868.8658] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 09:00:23 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628690423.4093] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 09:00:29 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628690429.0958] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 09:05:46 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628690746.4096] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 09:05:46 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628690746.5460] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 09:18:52 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628691532.3198] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 09:18:52 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628691532.3198] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 09:18:52 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628691532.3198] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 09:18:52 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628691532.3198] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7834] dhcp4 (enp2s0): option dhcp_lease_time      => '86400'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7834] dhcp4 (enp2s0): option domain_name          => 'attlocal.net'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7834] dhcp4 (enp2s0): option domain_name_servers  => '192.168.1.254'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7834] dhcp4 (enp2s0): option expiry               => '1628779279'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7834] dhcp4 (enp2s0): option ip_address           => '192.168.1.132'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7835] dhcp4 (enp2s0): option requested_broadcast_address => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7835] dhcp4 (enp2s0): option requested_domain_name => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7835] dhcp4 (enp2s0): option requested_domain_name_servers => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7835] dhcp4 (enp2s0): option requested_domain_search => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7835] dhcp4 (enp2s0): option requested_host_name  => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7835] dhcp4 (enp2s0): option requested_interface_mtu => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7835] dhcp4 (enp2s0): option requested_ms_classless_static_routes => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7835] dhcp4 (enp2s0): option requested_nis_domain => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7835] dhcp4 (enp2s0): option requested_nis_servers => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7836] dhcp4 (enp2s0): option requested_ntp_servers => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7836] dhcp4 (enp2s0): option requested_rfc3442_classless_static_routes => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7836] dhcp4 (enp2s0): option requested_root_path  => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7836] dhcp4 (enp2s0): option requested_routers    => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7836] dhcp4 (enp2s0): option requested_static_routes => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7836] dhcp4 (enp2s0): option requested_subnet_mask => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7836] dhcp4 (enp2s0): option requested_time_offset => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7836] dhcp4 (enp2s0): option requested_wpad       => '1'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7836] dhcp4 (enp2s0): option routers              => '192.168.1.254'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7837] dhcp4 (enp2s0): option subnet_mask          => '255.255.255.0'
Aug 11 09:41:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628692879.7837] dhcp4 (enp2s0): state changed extended -> extended
Aug 11 09:48:42 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628693322.3217] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 09:48:42 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628693322.3218] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 09:48:42 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628693322.3218] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 09:48:42 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628693322.3218] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 09:55:46 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628693746.8575] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 09:55:53 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628693753.5853] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 10:00:50 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628694050.4197] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 10:00:59 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628694059.5192] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 10:19:02 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628695142.3208] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'
Aug 11 10:19:02 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628695142.3208] dhcp6 (enp2s0): option dhcp6_name_servers   => '2600:1700:8790:a5b0::1'
Aug 11 10:19:02 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628695142.3208] dhcp6 (enp2s0): option ip6_address          => '2600:1700:8790:a5b0::35'
Aug 11 10:19:02 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628695142.3209] dhcp6 (enp2s0): state changed bound -> bound
Aug 11 10:31:19 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628695879.4093] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 10:31:26 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628695886.5364] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 10:41:46 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628696506.4102] manager: NetworkManager state is now CONNECTED_SITE
Aug 11 10:41:46 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628696506.5429] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 11 10:51:51 Lucas-server-optiplex-380 NetworkManager[1282]: <info>  [1628697111.7406] dhcp6 (enp2s0): option dhcp6_domain_search  => 'attlocal.net'

答案1

使用您需要执行的代码创建一个 bash 文件。使其chmod+x path/to/my/bashfile可执行。然后将此文件添加到 Mint 中的启动文件中:

打开“Mint”菜单,选择左侧的“系统设置”。选择“启动应用程序”图标: 1 选择“加号”并单击“自定义命令”添加名称和 bash 文件的路径。注销并再次登录。

但它应该可以在没有“黑客”的情况下工作

相关内容