I know that there are two ways to run Memgraph on Ubuntu:
sudo systemctl start memgraph
sudo service memgraph start
Is there a preferred way to run Memgraph?
I've seen that if Ubuntu is run as WSL that the command for running it is sudo runuser -l memgraph -c '/usr/lib/memgraph/memgraph'
. Can I use this command also on standalone Ubuntu installation, or is this one only for WSL?
systemctl
interacts with systemd
which is an init(and manager) system. When the Linux kernel is booted, there are some services that must start, etc. These are managed by systemd
which is controlled by systemctl
. service
is the same as systemctl
but for older systems which do not use systemd
as their init system.
This command is simply running the executable placed in /usr/lib/memgraph/memgraph
with the user memgraph
.
The difference between these two is that the latter one won't start on the startup while the first one will.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With