yuval.guide — Guides and hands-on courses on DevOps, cloud, Linux, Python, Kubernetes, networking and AI.
About Parameters in bash A parameter is an entity that stores values. There are three types of parameters: positional parameters special parameters variables We'll discuss here only positional parameters. (the other types will be discussed in other posts) Positional Parameters These are arguments present you give a …
Read MoreShell Script A shell script is a file containing one or more commands You could type those commands individually on the command line Here's the content of my first shell script: 1echo Hello World! We have already encountered the [echo] command in Command Types Now I have to give my file a name: do not choose a name …
Read MoreUNIX philosophy Every operating system needs to interract with users. The original UNIX philosophy said (among other things): Write programs that do one thing and do it well. Write programs to work together. This philosophy applis also to the interraction with the user, and the kernel. In other words, the UNIX system …
Read MoreAbout vi vi is a screen-oriented text editor originally created for the Unix operating system vi was a visual mode of the ex line editor, hence the name Being screen-oriented means that vi would work in a terminal you would use to connect textually to UNIX like systems (so telnet and ssh would be enough to use it) The …
Read MoreLet's create our own systemd service. Our service program We'll use a simple bash script that endlessly outputs text into a log file: 1for (( ; ; )) 2do 3 echo "still running:" $(date) >> /tmp/myprog.log 4 sleep 1 5done Save this in a file, make it executable by anyone (777) and copy to /usr/bin: Service Definition …
Read MoreAbout systemd Units Units are the objects that systemd knows how to manage. These are basically a standardized representation of system resources that can be managed by systemd Each unit is configured by a unit file Here's are some of systemd units: .service: A service unit describes how to manage a service or …
Read MoreAbout systemd systemd is a software suite that provides an array of system components for linux The primary component is a "system and service manager" – an init system used to bootstrap user space and manage user processes. It also provides replacements for various daemons and utilities, including: device management …
Read MoreAbout System Calls Some operations that are executed by a process involve just the CPU and the memory. Mathematical computations and logical decisiones are good examples of these. But sometimes, the process needs to do other things, that it cannot do alone. For example: interract with the computer hardware (e.g hard …
Read MoreTraditional creation of programs This is also called static linking The old way of creating programs was by writing multiple source files (text files with program code), then translating each one (called compile), thus creating object files. The, link these files to create an executable file, that can be run: Dynamic …
Read MoreWhat is a process A process is an instance of an executing program. A program is a file containing a range of information that describes how to construct a process at run time: Machine-language instructions: These encode the algorithm of the program. Data: The program file contains values used to initialize variables …
Read More