Linux

Since this is a very familiar topic, not much will be written here, a comprehensive look into Linux can be found here at Learning Linux.

A shell allows interaction with the system via text commands, notably system calls, program execution, and file manipulation. A kernel is the engine of an operating system which operates at the lowest level, managing computer hardware, memory, tasks, and providing an interface for system calls.

Use sudo to temporarily grant elevated privileges, logging into root carries several risks associated with it, including lack of accountability.

Some important commands:

  • ls: use -a for all files (i.e. hidden), use -l for β€œlong” with more details (i.e. file permissions).
  • chmod: specify the permissions, then the file. Permissions can be written in octal or symbolic form.
  • chown <user> <file>: specify owner of a file
  • useradd <user>: creates a new user, -g specifies default (primary) group, -G add user to additional groups.
  • userdel <user>: deletes a user.
  • usermod <user>: modifies a user config, -d changes their home directory, -l changes their login name, -L locks their account.

Useful high-level commands:

  • man <program>
  • whatis <program> - quick description on what a program does
  • apropos <query> - search man pages to find a program with query