How to find your IP address in Devuan linux?
In standard Devuan Linux installation command nmcli is included, but we have hostname command and can easily use is:
$ hostname -I
output:
192.168.0.103
In standard Devuan Linux installation command nmcli is included, but we have hostname command and can easily use is:
$ hostname -I
output:
192.168.0.103
Shutdown delay in Devuan Linux is made the same way as shutdown delay in other Linux distros. The only thing you have to do is to run "shutdown" comman with proper parameters. This is very easy. For example this command will delay system shutdown for 20 minutes:
$ shutdown +20
In case you want to delay shutdown for 2 hours, you run:
$ shutdown +120
This is simple thing: just set a number of minutes.
You already know, that to shut down system immediately, you can run a following command in linux terminal:
$ shutdown now
System will shutdown immediately. Surely, it you want to shutdown and then reboot it, you will run:
$ shutdown -r now
But sometimes you have to plan your shutdown (corporate rules, system maintenance, parental control etc). In this case you have just to pospone system shutdown using proper parameters while running "shutdown" command.
Sometimes you need to lock system and don't let users to log in. One of the solutions is to schedule system shutdown and postpone it with a lock from new logins. It can happen in case you want to upgrade the system, but it's impossible to kick logged users from the system and you want just to let them finish their work and then do you work.
Just imagine you need to postpone shutdown for 20 minutes and let users know that system maintenance is coming. Let's start postponed shutdown with an announcement, what is going to happen:
$ shutdown +20 "System upgrade is coming. Thank you for your patience"
As you know, Devuan is using a little bit different init system (sysvinit), than majority of linux distributions (systemd). It means, that you have a chance to follow system's startup and shutdown processes in detail. Moreover, sysvinit gives you a chance to adjust, modify and configure the way, how processes get started.
First process created in system has PID=1 and runs as a daemon. PID number 1 controls system's startup, shutdown and every changes happening with other proceses.
Let's see, how you Devuan system starts: Bootloader starts kernel, which spawns init, which parses inittab, which starts a service symlinks in the boot runlevel and then in the default operating runlevel.
Inittab is just a file, which describes and sets, which processes start in which runlevel. Let's see on a real example and explain, what means what.
To view an inittab, run a command:
$ cat /etc/inittab
In case you don't need Console game NetHack any more, you can easily uninstall it by running only two commands in terminal:
$ sudo apt-get purge nethack-console
and
$ sudo apt autoremove nethack-console
Output:
$ sudo apt-get purge nethack-console
[sudo] password for dima:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
nethack-common
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
nethack-console*
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 2,401 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 103588 files and directories currently installed.)
Removing nethack-console (3.6.0-4+b1) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for man-db (2.7.6.1-2) ...
(Reading database ... 103579 files and directories currently installed.)
Purging configuration files for nethack-console (3.6.0-4+b1) ...
$ sudo apt autoremove nethack-console
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'nethack-console' is not installed, so not removed
The following packages will be REMOVED:
nethack-common
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 2,088 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 103578 files and directories currently installed.)
Removing nethack-common (3.6.0-4+b1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...