Overview for linux

Explanation of inittab in Devuan

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.

What is inittab

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

Read more

Written by Administrator on Thursday April 30, 2020

How to create a file of a certain size in Linux using terminal (bash)

Sometimes we need to create files (actually generate them) for testing purposes or for checking our scripts or programs, working with file size limits. In linux you don't have program any script; bash is good enough to meet your requirements to achieve your goal. I will show you, how to generate files of any size you need in my Solus system (don't be afraid, all examples are working on every GNU/Linux based systems and distributions);

Creating a file of an approximate size

This is the fastest way to generate a file using truncate command:

$ truncate -s 2M edustorage.txt

We aimed to 2M big filesize, but let's see, what is precize filesize of this generated one:

dima@edustorage ~/test/yobany $ ls -l
total 0
-rw-rw-r-- 1 dima dima 2097152 Apr 28 11:55 edustorage.txt

Read more

Written by Administrator on Tuesday April 28, 2020

How to install Apache2 server on Linux Lite OS?

If you plan to install one of the most popular server on your system (Apache2), you should start with running a command:

$ sudo apt-get install apache2

output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fonts-hosny-amiri fonts-sil-scheherazade linux-headers-4.15.0-88
  linux-headers-4.15.0-88-generic linux-image-4.15.0-88-generic
  linux-modules-4.15.0-88-generic linux-modules-extra-4.15.0-88-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  apache2-bin apache2-data apache2-utils libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap
0 upgraded, 8 newly installed, 0 to remove and 20 not upgraded.
Need to get 1,604 kB of archives.
After this operation, 6,497 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libapr1 amd64 1.6.3-2 [90.9 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libaprutil1 amd64 1.6.1-2 [84.4 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libaprutil1-dbd-sqlite3 amd64 1.6.1-2 [10.6 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libaprutil1-ldap amd64 1.6.1-2 [8,764 B]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-security/main amd64 apache2-bin amd64 2.4.29-1ubuntu4.13 [1,070 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-security/main amd64 apache2-utils amd64 2.4.29-1ubuntu4.13 [83.8 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-security/main amd64 apache2-data all 2.4.29-1ubuntu4.13 [160 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic-security/main amd64 apache2 amd64 2.4.29-1ubuntu4.13 [95.1 kB]
Fetched 1,604 kB in 16s (101 kB/s)                                             
Selecting previously unselected package libapr1:amd64.
(Reading database ... 355358 files and directories currently installed.)
Preparing to unpack .../0-libapr1_1.6.3-2_amd64.deb ...
Unpacking libapr1:amd64 (1.6.3-2) ...
Selecting previously unselected package libaprutil1:amd64.
Preparing to unpack .../1-libaprutil1_1.6.1-2_amd64.deb ...
Unpacking libaprutil1:amd64 (1.6.1-2) ...
Selecting previously unselected package libaprutil1-dbd-sqlite3:amd64.
Preparing to unpack .../2-libaprutil1-dbd-sqlite3_1.6.1-2_amd64.deb ...
Unpacking libaprutil1-dbd-sqlite3:amd64 (1.6.1-2) ...
Selecting previously unselected package libaprutil1-ldap:amd64.
Preparing to unpack .../3-libaprutil1-ldap_1.6.1-2_amd64.deb ...
Unpacking libaprutil1-ldap:amd64 (1.6.1-2) ...
Selecting previously unselected package apache2-bin.
Preparing to unpack .../4-apache2-bin_2.4.29-1ubuntu4.13_amd64.deb ...
Unpacking apache2-bin (2.4.29-1ubuntu4.13) ...
Selecting previously unselected package apache2-utils.
Preparing to unpack .../5-apache2-utils_2.4.29-1ubuntu4.13_amd64.deb ...
Unpacking apache2-utils (2.4.29-1ubuntu4.13) ...
Selecting previously unselected package apache2-data.
Preparing to unpack .../6-apache2-data_2.4.29-1ubuntu4.13_all.deb ...
Unpacking apache2-data (2.4.29-1ubuntu4.13) ...
Selecting previously unselected package apache2.
Preparing to unpack .../7-apache2_2.4.29-1ubuntu4.13_amd64.deb ...
Unpacking apache2 (2.4.29-1ubuntu4.13) ...
Setting up libapr1:amd64 (1.6.3-2) ...
Setting up apache2-data (2.4.29-1ubuntu4.13) ...
Setting up libaprutil1:amd64 (1.6.1-2) ...
Setting up libaprutil1-ldap:amd64 (1.6.1-2) ...
Setting up libaprutil1-dbd-sqlite3:amd64 (1.6.1-2) ...
Setting up apache2-utils (2.4.29-1ubuntu4.13) ...
Setting up apache2-bin (2.4.29-1ubuntu4.13) ...
Setting up apache2 (2.4.29-1ubuntu4.13) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling module reqtimeout.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
insserv: warning: current start runlevel(s) (empty) of script `apache-htcacheclean' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `apache-htcacheclean' overrides LSB defaults (0 1 6).
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.39) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
ureadahead will be reprofiled on next reboot

Read more

Written by Administrator on Monday April 27, 2020

How to update fresh installed Solus?

Right after you've installed Solus on your computer it's good to check the "freshness" of all packages installed in your system. Sometimes in very specific cases it's not good to install the most freshest versions of drivers, libraries and programs, but our case is different. In fresh system you surely want to have current stable versions of packages, so let's check, how fresh our system is.

First, let's upgrade repositories:

$ sudo eopkg upgrade

Then let's upgrade packages:

$ sudo eopkg up

In my case system has found a big amount of packages to update:

Total size of package(s): 710.39 MB
There are extra packages due to dependencies.
Do you want to continue? (yes/no)y

Read more

Written by Administrator on Monday April 27, 2020

How to install pipx and pip in Solus

pipx is a tool is a great tool for installing and running end-user applications written in Python. pipx is using pip, but focused on installing and managing Python packages that can be run from the command line directly as applications.

Installation of pipx in Solus system is very easy. just run following command in terminal:

$ python3 -m pip install --user -U pipx

Output:

Read more

Written by Administrator on Monday April 27, 2020