Linux

Processes

Listing processes

Killing processes

Signals

Start on Boot

systemtcl - system control can be used to start and stop services. Options:

Background vs Foreground

Processes can run in two stages: background and foreground. Common commands are run in foreground, such as ipconfig or grep. But running webserver, vpn or sqlserver, it is better to do on background because then you don’t need to keep terminal open and can do other things too.

using background

foregrounding background process

Foreground bg commans with fg {PID}.

Automation

cron

With rcon jobs we can automate things like running commands, doing backups and launching programs by certain time.

crontabs

command syntax: like 0 8 */2 * 1 echo "Happy Monday, bää bää ;)" this would echo “Happy Monday, bää bää ;)” every first day of week (but only every second month) at 8 am. asterisk * means that the field does not matter e.g. all values for that field for example every month of the year would be *.

link for online rcon generator.

Package Management Systems

APT

APT is packet manager for debian systems introduced by Ubuntu 16. It is meant to be simpler and better for end users.

apt-get

Older and Lower-level tool that does pretty much all the same things than apt. Apt is said to be more simpler for end user than apt-get.

DNF

DNF or Dandifier YOU is successor to YUM (Yellow-Dog Updater Modified). DNF is default package manager of Fedora and RedHat.

Logs

Logs are located at /var/log folder. Logs are very important for defensive cyber security.

Access Logs

What people do?

Error Logs

What errors are generated?

Firewall

UFW

UFW or Uncomplicated FireWall is default firewall in Ubuntu 8+ and many other distributions. Note that it is not always enabled by default.

IP Tables

TODO: