milosev.com
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
      • Côte d'Azur 2024
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home

Display avaliable memory with colors

Details
Written by: Stanko Milosev
Category: Ubuntu
Published: 17 July 2026
Last Updated: 17 July 2026
Hits: 631
To display avaliable memory with colors
free -h | awk 'NR==2{printf "\033[36mRAM\033[0m | \033[32m%s\033[0m Total | \033[31m%s\033[0m Used | \033[32m%s\033[0m Free | \033[33m%s\033[0m Avail\n",$2,$3,$4,$7}'

Change pass add user

Details
Written by: Stanko Milosev
Category: Ubuntu
Published: 17 July 2026
Last Updated: 18 July 2026
Hits: 704
sudo passwd root
sudo adduser username
If you want the user to be able to run administrative commands:
sudo usermod -aG sudo username
Delete user
sudo deluser username
sudo deluser --remove-home username

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

Details
Written by: Stanko Milosev
Category: Ubuntu
Published: 17 July 2026
Last Updated: 18 July 2026
Hits: 520
If on:
ssh username@ip-addres
I receive error like:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
Then do
ssh-keygen -R ip-addres

Installing and Running an ASP.NET Core 10 Application on Ubuntu 24.04 with Nginx

Details
Written by: Stanko Milosev
Category: Ubuntu
Published: 12 July 2026
Last Updated: 02 August 2026
Hits: 761

Hier I already gave one example how to install Nginx, now here is example how to install ASP.NET Core 10 Application on Ubuntu 24.04 with Nginx.

This guide explains how to deploy an ASP.NET Core 10 application from a Windows 11 development machine to an Ubuntu 24.04 server running inside VMware. It covers installing the .NET runtime, publishing the application, copying it to Ubuntu, testing it manually, and configuring it as a systemd service.


Install the .NET 10 Runtime

Download and install Microsoft's package repository.

wget https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt install -y aspnetcore-runtime-10.0

Verify the Installation

dotnet --info

You should see output similar to:

.NET SDK:
 Version:           10.0.xxx

Host:
  Version:          10.0.xxx
  Architecture:     x64
  RID:              linux-x64

.NET runtimes installed:
  Microsoft.AspNetCore.App 10.0.xxx
  Microsoft.NETCore.App    10.0.xxx

Publish the Application on Windows 11

On your Windows development machine, open a command prompt in the folder containing your solution (.sln) file.

Publish the application directly to your VMware shared folder.

dotnet publish -c Release -o "\\vmware-host\Shared Folders\ubuntuVmShare\asp"

or from folder to folder:

dotnet publish "C:\folderFrom\myProject.csproj" -c Release -o "C:\folderTo\publish"

After publishing completes, the output folder will contain everything needed to run the application.


Copy the Published Application to Ubuntu

Assuming your VMware shared folder is named ubuntuVmShare, copy the published files to the web directory.

sudo cp -a /mnt/hgfs/ubuntuVmShare/asp/. /var/www/html/net/

Change to the application directory.

cd /var/www/html/net/

Locate the Application DLL

Search for the runtime configuration file.

find . -name "*.runtimeconfig.json"

Example output:

./Kanaloa.runtimeconfig.json

The filename tells you which DLL to start. In this example, the application is started with:

dotnet Kanaloa.dll

Run the Application Manually

If everything is configured correctly, you should see output similar to:

warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
      No XML encryptor configured. Key {de507390-fb82-4965-a58a-0e17b6285227} may be persisted to storage in unencrypted form.

info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://localhost:5000

info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.

info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production

info: Microsoft.Hosting.Lifetime[0]
      Content root path: /var/www/html/net

The Data Protection warning is normal for many server installations and does not prevent the application from running.

Press Ctrl+C to stop the application before continuing.


Create a systemd Service

Create a new service definition.

sudo nano /etc/systemd/system/kanaloa.service

Insert the following configuration:

[Unit]
Description=Kanaloa ASP.NET Core API
After=network.target

[Service]
Type=simple
WorkingDirectory=/var/www/html/net
ExecStart=/usr/bin/dotnet /var/www/html/net/Kanaloa.dll

Restart=always
RestartSec=5

User=www-data
Group=www-data

Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=ASPNETCORE_URLS=http://127.0.0.1:5000

[Install]
WantedBy=multi-user.target

Save the file (Ctrl+S) and exit Nano (Ctrl+X).


Reload systemd

Reload the service definitions.

sudo systemctl daemon-reload

Enable the Service

Configure the service to start automatically during boot.

sudo systemctl enable kanaloa

Expected output:

Created symlink:
/etc/systemd/system/multi-user.target.wants/kanaloa.service
→ /etc/systemd/system/kanaloa.service

Start the Service

sudo systemctl start kanaloa

Verify the Service Status

sudo systemctl status kanaloa

You should see something similar to:

● kanaloa.service - Kanaloa ASP.NET Core API
     Loaded: loaded (/etc/systemd/system/kanaloa.service; enabled)

     Active: active (running)

     Main PID: 12345 (dotnet)

      Tasks: ...
      Memory: ...
      CPU: ...

The important line is:

Active: active (running)

Summary

Your ASP.NET Core application is now:

  • Running on Ubuntu 24.04.
  • Listening on http://127.0.0.1:5000.
  • Managed automatically by systemd.
  • Configured to start automatically whenever the server boots.
In
sudo nano /etc/nginx/sites-available/default
I added:
location /kanaloa/ {
	proxy_pass         http://127.0.0.1:5000/;
	proxy_http_version 1.1;

	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header Connection keep-alive;
	proxy_set_header Host $host;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	proxy_set_header X-Forwarded-Proto $scheme;
	proxy_set_header X-Forwarded-Host $host;

	proxy_cache_bypass $http_upgrade;
}	

Now I can open http://myDomain.com/kanaloa/

To display error I am using:

sudo journalctl -u kanaloa -f

or

sudo journalctl -u kanaloa --since "2 minutes ago" --no-pager
  1. Installing Nginx, MariaDB, and PHP 8.5 on a Clean Ubuntu Server for Joomla!
  2. Installing Mailcow on a Clean Ubuntu Installation
  3. JSON prettifier for Gedit
  4. Software which I use

Subcategories

C#

Azure

ASP.NET

JavaScript

Software Development Philosophy

MS SQL

IBM WebSphere MQ

MySQL

Joomla

Delphi

PHP

Windows

Life

Lazarus

Downloads

Android

CSS

Chrome

HTML

Linux

Eclipse

Page 172 of 174

  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174