We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
View Post on Blog
Useful commands and tips about system operation. Things more about scripting are in Bash Cheatsheet
systemctl
/etc/systemd/system/service-name.service
sudo systemctl enable sshd.service
disable is the opposite.
disable
[Service] Environment=PATH=/home/pi/.local/bin:/home/pi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Note $PATH do not have its special meaning here. https://askubuntu.com/questions/1014480/how-do-i-add-bin-to-path-for-a-systemd-service for advanced.
Note
$PATH do not have its special meaning here.
$PATH
https://askubuntu.com/questions/1014480/how-do-i-add-bin-to-path-for-a-systemd-service for advanced.
[Unit] Description=Jupyter Notebook [Service] Type=simple PIDFile=/run/jupyter.pid Environment=PATH=/home/pi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ExecStart=jupyter lab --config=/home/pi/.jupyter/jupyter_notebook_config.py User=pi Group=pi WorkingDirectory=/home/pi/Notebooks/ Restart=always RestartSec=10 #KillMode=mixed [Install] WantedBy=multi-user.target
From https://unix.stackexchange.com/questions/225401/how-to-see-full-log-from-systemctl-status-service/225407
Use journalctl command. e.g.
journalctl
journalctl -u service-name.service
-u is short for --unit. More useful options:
-u
--unit
-f
--follow
-r
--reverse
apt
https://askubuntu.com/questions/473886/list-all-versions-of-a-package
apt-cache madison chromium-browser # or apt-cache showpkg lyx
https://askubuntu.com/questions/428772/how-to-install-specific-version-of-some-package
# get version of installed package apt-cache policy <package name> # install a specific package version sudo apt-get install <package name>=<version>
cat /etc/os-release
less /etc/passwd
lsof
LiSt Open Files. A very powerful tool.
For network checking:
ls -i [46][protocol][@hostname|hostaddr][:service|port]
e.g.
sudo lsof -i :80
find
find -iname 'qwerty' find dir/ -iname 'qwerty' find -name 'Qwerty'
sudo service network-manager restart
The text was updated successfully, but these errors were encountered:
No branches or pull requests
View Post on Blog
systemctl
Where are service files?
Start at Boot
sudo systemctl enable sshd.service
disable
is the opposite.Use Environment in Service Unit File
Unit File Template
Click to expand
Exited Without Error Log?
From https://unix.stackexchange.com/questions/225401/how-to-see-full-log-from-systemctl-status-service/225407
Use
journalctl
command. e.g.-u
is short for--unit
. More useful options:-f
,--follow
: Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.-r
,--reverse
: Reverse output so that the newest entries are displayed first.apt
List All Versions
https://askubuntu.com/questions/473886/list-all-versions-of-a-package
apt-cache madison chromium-browser # or apt-cache showpkg lyx
Install Specific Version
https://askubuntu.com/questions/428772/how-to-install-specific-version-of-some-package
OS Release Info
List All Users
lsof
LiSt Open Files. A very powerful tool.
For network checking:
e.g.
find
No Wireless Connection After Sleep
The text was updated successfully, but these errors were encountered: