When using Ubuntu as a server OS, you may need to configure it so that the IP address remains consistent.
This guide explains how to set a static IP address on Ubuntu.
# Check Network Interface Information Enter ip address to check your network interface information.
ip address 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether dc:a6:32:c4:6d:4e brd ff:ff:ff:ff:ff:ff inet 192.
SSH is a protocol for securely logging into remote computers, transferring files, and executing commands over a network. It encrypts communications, preventing eavesdropping and ensuring security.
This guide explains how to generate keys for use with SSH.
# Setting the Encryption Algorithm and Key Length You can generate a key using the ssh-keygen command. The following example generates a key using the RSA encryption algorithm with a key length of 4096.
When packages are updated automatically, there is a chance that software that was previously working may suddenly stop functioning.
This guide explains how to disable automatic updates for APT packages.
# Check Automatic Update Settings The automatic update settings are located in the 20auto-upgrades file within the /etc/apt/apt.conf.d directory. Below is an example of the settings:
APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "1"; Update-Package-Lists indicates automatic package updates, while Unattended-Upgrade represents automatic package upgrades.
In C, it is possible to allocate memory dynamically. Dynamic memory allocation is useful when the required memory size changes at runtime or when large memory areas are needed.
This article explains how to allocate memory dynamically and provides some points of caution.
# Functions for Dynamic Memory Allocation and Deallocation The C standard library provides functions for dynamic memory allocation and deallocation.
#include <stdlib.h> void *malloc(size_t size); void free(void *ptr); void *calloc(size_t nmemb, size_t size); void *realloc(void *ptr, size_t size); To use these functions, include stdlib.
During development, you may encounter situations where you need to allocate multiple dynamic memory blocks within a function. If memory allocation fails, you’ll need to free any previously allocated memory, which can make error handling complex.
This article explains how to simplify error handling and manage memory deallocation by using the goto statement.
# What is the goto Statement? The goto statement is a syntax used to jump to a specified label within a function.
Both apt and apt-get are package management tools used in Debian-based Linux distributions.
This article explains the differences between these two commands and when to use each.
# What is apt-get? apt-get is one of the older package management tools. It allows you to fetch packages from repositories, install, upgrade, and remove them.
It automatically handles dependency resolution, deals with conflicting packages, and manages the cache. Additionally, it can perform system-wide upgrades.
MinGW is a free tool that can be used as a C/C++ development environment. While MinGW itself is no longer actively developed, its successor MinGW-w64 is under active development.
This guide explains the steps to install MinGW-w64 on Windows.
# Download MinGW Go to the official download page and download MinGW.
Follow the link to MinGW-W64-builds, which will lead you to a GitHub page where the files are hosted.
The files are distributed in 7z format, so download the version you prefer.
Git is a version control system that helps manage changes to programs, documents, and other files.
This guide explains the steps to install Git for Windows.
# Download and Run the Installer Go to the official website and click “Download” in the middle of the page to download the installer.
After downloading, run the installer. You will need administrator privileges to proceed.
# License Agreement The license agreement will be displayed.
Using Hugo and GitHub Pages, you can easily publish a static website. Here, I will explain the steps.
# Create a Repository for the Website on GitHub Create a repository on GitHub with any name. For details, refer to this guide.
If you name the repository <username>.github.io, your website will be published at https://<username>.github.io/. If your account name contains uppercase letters, you need to convert them to lowercase.
If you create a repository with a different name, the URL for your website will be https://<username>.
Creating a repository on GitHub is a very simple process. Below are the specific steps.
# Open the Repository Creation Page Go to GitHub and log in to your account.
Click the “+” icon in the top-right corner of the homepage, and select “New repository” from the dropdown menu.
# Enter the Basic Information for the Repository Enter the repository owner, name, and description.
Owner
Select the account or organization that will own the repository.