systemd uses its own .service files (units with the .service suffix)
[Unit]: this section contains information not specifically related to the type of the unit, such as the;
Description=The Apache HTTP Server
the After option, we can state that our unit should be started after the units we provide;
After=network.target remote-fs.target nss-lookup.target httpd-init.service
start the service unit httpd.service only after the network, remove-fs, nss-lookup targets and the httpd-init service
dependencies can be declared by using the Requires option;
list "soft" dependencies by using the Wants option;
[Service] section of a service unit: contains information about the specific type of the unit, we can specify things as the command to be executed when the service is started
The command to be executed when a service starts, is declared by using the ExecStart option, declare commands to be executed before and after the service is started, by using the ExecStartPre and ExecStartPost options respectively.
[Install]: This section contains information about the installation of the unit; we can use options related to the service installation.
Sample <service>.service file: (ethtool.service)
Save in : /usr/lib/systemd/system and /etc/systemd/system
Description=Force ens5f5 ethernet interface to 100Mbps
ExecStart=/usr/sbin/ethtool -s ens5f5 wol d
ExecStop=/usr/sbin/ethtool -s ens5f5 wol g
Install the service we will copy the file into the /etc/systemd/system directory as ethtools.service, than we will start it:
$ sudo cp ethtools.service /etc/systemd/system && sudo systemctl start ethtools.service
verify the service is active, with the following command:
$ systemctl is-active ethtools.service
Difference between ddrescue, dd_rescue, and gddrescue
dd_rescue is packaged under the name ddrescue, and ddrescue is packaged under the name gddrescue
ddrescue is a program written in C++ and produces output on the console/terminal, handles unreadable blocks (recovery).
gddrescue is the GNU ddrescue version providing the /sbin/ddrescue executable
/dev/kvm device: permission denied [solved]
New Ubuntu 18.04 install, fresh Android Studio 4.0 install. First run....
/dev/kvm device: permission denied
Here's how to fix, the correct way.
add user to the kvm group.
reboot your system.
how to copy files from windows to linux using command line
Download pscp.exe from here
Copy File from Windows To Linux
__ -pw for the password
__ replace password
__ C:\Users\file.doc represents the file that will be copied
__ 10.0.0.10 is the IP of the server.
__ /home/mypath is the path to copy the file
Copy File From Linux To Windows