Anduin

let today = new Beginning();

Bash and Linux Some tips about bash and Linux.


Install Cockpit on Ubuntu 22.04

It's simple. Install First: sudo apt install cockpit -y Authentication Ensure you have a user instead of root is in the sudo group. Please follow the instructions from: Best practice for authentication Fix network issue You may see the following error after installation: packagekit cannot refresh cache whilst offline First go to here: cd /etc/netplan/ Create a new profile: sudo touch /etc/netplan/ …

bash Ubuntu Remote Management Cockpit NetworkManager

CaddyV2 tips

Here are some tips when I am using CaddyV2 as a reverse proxy. Directly render HTML somedomain.aiursoft.com { respond / h1Welcome/h1 200 } Reverse proxy on certain address somedomain.aiursoft.com { reverse_proxy /admin http://v2ray:10000 { } } Permenant redirect git.aiursoft.com { redir https://git.aiursoft.cn{uri} permanent } Reversey proxy and add custom header  …

Reverse Proxy Linux Ubuntu Caddy CaddyV2

Build a new NFS server with WinServer or Ubuntu and mount it

Windows Server On Windows Server, creating a new NFS server is simple. First install this: file And then click the folder properties. file And enable that. file Ubuntu Run: sudo apt update sudo apt install nfs-kernel-server -y sudo mkdir -p /mnt/nfs_share sudo chown -R nobody:nogroup /mnt/nfs_share/ sudo chmod 777 /mnt/nfs_share/ And edit the configuration: sudo vim /etc/exports Add this: /mnt/  …

Linux Ubuntu File Windows Server Share NFS VMware ESXI Vsphere NAS

Mount Windows SMB folder to Ubuntu

First, install tools: sudo apt install cifs-utils Create a new folder: sudo mkdir /mnt/share To mount: sudo mount -t cifs -o username=your-name //your-server/your-path /mnt/share your-name is your Windows user name. your-server is the server IP address or domain name. your-path is the folder name of that SMB share. After executing, you might need to input the password. <div style="display:inline- …

bash Linux Ubuntu Windows Server SMB Share

Use you local server to replace the cloud with FRP.

Why am I doing this? I've been complaining: the public cloud is too expensive. A typical server costs about 150USD a month. And because I use a lot of Azure PaaS services, my current business needs to cause me to spend more than 500USD per month. In addition, the database and App Service are both costly. This practice proves: that using Azure is very expensive. So I've been thinking: I have a lot  …

IP bash Linux Windows Server Cloud FRP Network Port Firewall

Auto backup for Minecraft on Linux

Recently, I was addicted to Minecraft. And I hosted a server. In order to backup the server automatically, I have tried many solutions. Git solution Git solution requires a lot of CPU when compressing the objects. And may impact the game performance since Java itself requires a lot of CPU. So I finally gave up Git.   Copy solution Copy the world folder to anther place is super simple. Before try  …

bash Linux Minecraft Backup

Programmatically connect to the remote server via SSH and execute remote command.

Recently I was trying to build a server management tool. That I need to connect to my server (Ubuntu) programmatically. I usually access my server via SSH, as a normal human. So I wanna do it with the same approach. First, create a new .NET Core project with: dotnet new console After creating the new project, install the latest SSH.NET library. Reference: NuGet Gallery | SSH.NET 2020.0.1 And  …

C# .NET Core bash Linux SSH

FFmpeg 用法概览

背景 最近买了个4K,144Hz的 HDR 显示器。新的显示器很不错,于是我想先进行测试一下。 于是我下载了非常多 4K 视频,准备观赏观赏。但是很快发现,怎么得到最优质的播放体验还是一个深坑。而衡量视频质量,除了看分辨率,还要看编码格式,码率,色彩,HDR等信息。 显然,现在折腾视频,最方便的工具就是 ffmpeg 了。FFmpeg 是一个开放源代码的自由软件,可以执行音频和视频多种格式的录影、转换、串流功能,非常适合快速、批量的修改视频。 开始之前 安装ffmpeg ffmpeg 的最新版下载地址始终都是: https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z 直接将其下载,解压,放到一个地方,将 exe 文件所在路径加入环境变量 PATH 即可。 了解视频的编码格式 开始之前,需要先了解平时经常使用的编码格式和平台支持情况,以及什 …

bash FFmpeg

Best-practice for authentication after creating a new Linux server

This article helps you change the following items if your cloud provider didn't do that for you. Create your own account instead of root. Disable password login and force to use SSH key to log in. Disable root account. Enable sudo without password. Before starting the process, make sure you have a valid SSH key-pair locally. Fist, connect to the server. (With root password). you@local  …

bash Linux Ubuntu SSH

Download any Azure Media Service video or live stream with FFmpeg.

This blog shows a tutorial about how to download any Azure media service video or live stream. Before starting, you need to have FFmpeg installed. No matter you are using Windows, Linux, or Mac OS. Download latest FFmpeg here: https://ffmpeg.org/download.html After installing it, prepare a command: ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "{0}" -c copy video.mp4 And you  …

Azure Media Player bash Azure Azure Media Service Download FFmpeg

Tips for Azure CLI script programming on bash

Ask the user to select the Azure cloud under which he runs the Azure CLI: login_azure() { no_cloud=true while $no_cloud; do echo 'Select your cloud:' az cloud list --output table read -p 'Enter the name:' cloudName az cloud set --name $cloudName && no_cloud=false done az account show || az login echo 'To logout, please press `  …

bash Azure DevOps Azure CLI

Install Azure CLI on Windows 10 and use it in bash

The Azure command-line interface (CLI) is Microsoft's cross-platform command-line experience for managing Azure resources. The Azure CLI is designed to be easy to learn and get started with, but powerful enough to be a great tool for building custom automation to use Azure resources. The Azure CLI is available to install in Windows, macOS and Linux environments. It can also be run in a Docker  …

bash Azure Azure CLI PowerShell