computer use





RTC Alarm

RTC Alarm is a hardware-level timing function controlled by the real-time clock (Real-Time Clock) on the motherboard. Even when the operating system is shut down or the hardware is in deep sleep, as long as the motherboard is still powered by battery or external power, it can trigger a signal to wake up the system at a preset time.


Core principles

The RTC chip contains a timer and an alarm register internally. When the value of the timer matches the target time (seconds, minutes, hours, and days) set in the register, the hardware will send an interrupt signal (Interrupt) to notify the power management unit (PMU) to perform a power-on action.


Main application scenarios


Operating system configuration method

platform Setting method
Windows Check "Wake the computer to perform this job" through the "Job Scheduler", or use PowerShell to manage Wake Timers.
Linux Use instructionsrtcwake -m mem -s 60(Represents waking up from memory sleep after 60 seconds).
BIOS/UEFI Turn on Resume By RTC Alarm in the Power Management option and set a fixed time.

Effective conditions and restrictions



Windows

Windows 11 shortcut keys



PowerShell

What is PowerShell?

PowerShell is a cross-platform task automation solution, consisting of a command shell (Shell), a command code language, and a configuration management framework. Unlike traditional CMD, PowerShell is based on.NETConstructed, which handlesObjectsrather than a plain text string.

---

Core instruction structure: Verb-Noun

PowerShell commands (called Cmdlets) follow a "verb-noun" naming convention, making them very intuitive and easy to learn:

---

Powerful pipe symbol (Pipeline)

In Linux Bash, pipes pass literals; in PowerShell, pipes pass completeobject. This means that subsequent instructions can directly access the properties produced by the previous instruction.

Example: Find the top 5 memory-consuming programs

Get-Process | Sort-Object WorkingSet -Descending | Select-Object -First 5
---

Common command comparison table

Function PowerShell Cmdlet Alias
list files Get-ChildItem ls / dir
Move directory Set-Location cd
copy file Copy-Item cp / copy
Show text Write-Output echo
Filter data Where-Object ? / where
---

Advanced function: View object properties

If you want to know what information the object returned by a command contains, you can useGet-Member

Get-Service | Get-Member

This will list all the properties and methods of the object, such as the serviceStatus, DisplayNamewait.

Execution script (.ps1)

By default, Windows restricts script execution for security reasons. To execute what you wrote.ps1Files usually require adjusting permissions:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser


How to display seconds in the lower right corner of Windows

Windows 10 / 11

  1. pressWin + R,enterregedit, press Enter to open the registration editor.
  2. Navigate to path:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
  3. Right click to addDWORD (32-bit) value, named:
    ShowSecondsInSystemClock
  4. Double click and set to numeric value1
  5. Log out and log in again, or restart File Explorer (explorer.exe).
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name ShowSecondsInSystemClock -Value 1
Stop-Process -Name explorer -Force

Windows 7

  1. Download T-Clock (GitHub):https://github.com/White-Tiger/T-Clock
  2. Unzip and executeClock.exeorTClock.exe
  3. Right click on the time in the lower right corner → SelectT-Clock Properties
  4. Enter in Time Format:
    hh:nn:ss tt
  5. Click Apply to display the time in seconds.

Time format example

Format Display example
hh:nn:ss tt 03:45:12 PM
HH:nn:ss 15:45:12
dddd, mmmm d, yyyy Monday, July 28, 2025


pagefile.sys virtual memory paging file management

1. What is pagefile.sys?

2. How to modify the path and size of pagefile.sys

  1. Open system properties:
  2. Enter performance options:
  3. Manage virtual memory:
  4. Set the paging file path and size:
  5. Save and restart the system:

3. Precautions

4. Best practices for paging files



View memory configuration

Method 1: Use Windows built-in tools

You can view the memory configuration through the Resource Monitor or command tools provided by Windows.

1. Use Resource Monitor to view

  1. pressCtrl + Shift + EscOpen the job manager.
  2. ClickefficacyPagination.
  3. Select on the leftmemory
  4. Check the slot usage in the upper right corner. If there are multiple memories, "Slot 0", "Slot 1", etc. will be displayed.

For example:

2. Use command prompt characters

  1. Open the command prompt (pressWin + R,entercmdand press Enter).
  2. Enter the following command to view memory information:
    wmic MEMORYCHIP get BankLabel, Capacity, DeviceLocator, PartNumber
  3. Review the output to confirm the memory slot and capacity.

Example output:

BankLabel      Capacity        DeviceLocator
BANK 0         4294967296      DIMM0
BANK 1         4294967296      DIMM1
    

This example shows two 4GB memory banks.

3. Use PowerShell

  1. Open PowerShell (pressWin + R,enterpowershelland press Enter).
  2. Execute the following command to view the memory:
    Get-CimInstance -ClassName Win32_PhysicalMemory | Format-Table BankLabel, Capacity, DeviceLocator
  3. View the results in a manner similar to command prompt characters.

Method 2: Use third-party tools

If you need more detailed memory information, you can use the following tools:

1. Using CPU-Z

  1. Download and installCPU-Z
  2. Open the program and switch toMemoryPaging to view total capacity and channel mode (e.g. single channel or dual channel).
  3. switch toSPDPaging, view the memory information of each slot.

2. Using HWiNFO

  1. Download and installHWiNFO
  2. Select "Summary-only" mode to start, or click the "Memory" tab to view detailed information about each memory module.

Method 3: Check the physical hardware

If the above method cannot confirm, you can turn off the computer power and open the case to manually check the actual module number and label of the memory slot.

Summarize



Performance Monitor PerfMon

Performance Monitor (PerfMon for short) is a powerful tool built into Windows for real-time monitoring of system resources (such as CPU, memory, hard disk, network) and application performance data. It helps developers and system administrators diagnose performance bottlenecks or resource leaks.


How to turn on PerfMon


Core function module


Common performance counters (Counters)

Object Counter illustrate
Processor % Processor Time Overall CPU usage, if it continues to be higher than 80%, there may be a bottleneck.
Memory Available MBytes The amount of available physical memory. If the value is too low, the system will frequently swap paging.
Paging File % Usage Virtual memory usage can be used to determine whether physical memory is insufficient.
PhysicalDisk % Idle Time / Avg. Disk Queue Length Hard drive idle ratio or queue length, used to diagnose disk I/O latency.
Process Private Bytes / Working Set The memory usage of a specific program is detectedMemory Leakkey indicators.

Troubleshooting app


Differences from other tools



lodctr

lodctr is a Windows built-in command line tool, mainly used to log in, update or repair the performance counter name and description text of Performance Monitor (PerfMon). It is the core tool for managing the association between system performance objects and application counter definition files (.ini).


Core functions and uses


Common command syntax

Command example Function description
lodctr /s:backup.txt Back up the current performance counter settings to the specified text file.
lodctr /r:backup.txt Restore performance counter settings from backup file.
lodctr /r Most commonly used repair instructions. Automatically rebuild login information for all performance counters (requires administrator privileges to execute).
lodctr <filename.ini> Install specific counter definition files.
unlodctr <AppName> Remove performance counter settings for a specific application.

Common repair scenarios: PerfMon displays abnormally

If you see a "Unable to load performance counter" error message when launching Performance Monitor, or the counter name changes to a string of numbers, you can usually resolve it by following these steps:

  1. bySystem administrator identityTurn on command prompt (CMD).
  2. entercd %systemroot%\system32Enter the system directory.
  3. implementlodctr /r. The system will attempt to repair all counters based on the backup file.
  4. If you see the "Performance counter settings were successfully rebuilt" prompt, just restart the performance monitor.

Things to note



Computing performance test

Computing performance testing refers to using standardized algorithms or loads to evaluate the speed, stability and efficiency of computer hardware (CPU, GPU) or software systems when processing complex instructions. This type of testing is an important basis for optimizing code and hardware selection.


Core test indicators


Common test types

Test type Test purpose
Benchmarking Use standardized tools such as SPEC or Geekbench to compare results to industry standards.
Stress Testing Push the load to the limit and observe the system's crash point and resilience when resources are exhausted.
Load Testing Run for a long time under expected high load to confirm whether the system can provide stable services.
Concurrency Testing Simulate multiple users or multiple threads executing tasks at the same time, and check whether there are locks or race conditions.

Commonly used computing performance testing tools


Best practices for testing



Windows Check CPU Temperature and Motherboard Temperature

Use BIOS to view

Restart the computer and enter the BIOS (usually pressF2F10orDelete). CPU and motherboard temperatures can be viewed in hardware monitoring or system health status.

Using Task Manager

Currently, Windows' built-in job manager does not provide CPU temperature display, but it can view CPU usage and clock speed.

Using Windows PowerShell

You can try using the following PowerShell command to obtain temperature information (some systems may not support it):

Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi"

Use third-party software

Using the command prompt (CMD)

You can try the following command to check the temperature (some systems may not support it):

wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature

If the returned value is larger, you usually need to divide by 10 and subtract 273.15 to get the Celsius temperature.

Abnormal CPU usage and clock speed when the temperature is too high



Check your motherboard model in Windows

Method 1: Using Command Prompt

  1. Turn on command prompt characters:
  2. Enter the following command and execute it:
    wmic baseboard get product,manufacturer
  3. You will see output similar to the following:
    Manufacturer      Product
    ASUS              PRIME Z390-A
                

Method 2: Use PowerShell

  1. Start PowerShell:
  2. Enter the following command and execute it:
    Get-WmiObject Win32_BaseBoard | Format-Table Manufacturer, Product
  3. You will see the manufacturer and model of your motherboard.

Method 3: Use third-party tools

If you need more detailed information, you can use the following third-party tools:

Method 4: Check BIOS or UEFI

  1. Restart the computer and press the specified key during startup to enter the BIOS/UEFI setup interface:
  2. Information about the motherboard model can usually be found in the BIOS/UEFI interface.


Change the file extension of the opener

Edit via File Explorer

  1. Find the file you want to modify in File Explorer.
  2. Right-click on the file and select "content」。
  3. exist"generally” tab, click “change...」。
  4. Select the program you want to use to open this type of file and clickSure」。
  5. according to"Apply"Click again"Sure” Complete the setting.

Use "Open file method" to modify

  1. Right-click the target file and select "Open file method」 > 「Choose another app」。
  2. Select an application from the list. If it is not listed, click "More apps", or use "Find other apps on this computer」。
  3. Check "Always use this application to open .extension files」。
  4. Press "Sure” Complete the setting.

Modify via console

  1. Open"console」 > 「Default application」。
  2. Click "Select default application based on file type」。
  3. Find the file extension you want to change, such as ".txt", and click the application name next to it.
  4. Select a new application from the list, or browse to add a new executable.


Extension default program selection failed

Important preface

Windows 10 / 11 has "Extension Default Program"protection mechanism
You can’t just change one machine code and it will take effect permanently., otherwise it will be automatically restored by the system. But there are still "feasible and stable" methods.

How Windows default programs actually work

Directly changing UserChoice without the correct Hash → will definitely fail


Method 1: Use ProgID (recommended, the most stable)

Step 1: Create a custom ProgID

Suppose you want to useNotepad++(Please adjust the path yourself)


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\MyTxtEditor]
@="My TXT Editor"

[HKEY_CLASSES_ROOT\MyTxtEditor\shell\open\command]
@="\"C:\\Program Files\\Notepad++\\notepad++.exe\" \"%1\""

savemytxteditor.regand import

Step 2: Point the .txt to the ProgID


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.txt]
@="MyTxtEditor"

✔ This method is valid for "system level" ✔ Valid for new accounts and new files ⚠ Existing UserChoice may still overwrite


Method 2: Delete UserChoice (let the system apply it again)

This is the key step

Delete the following machine codes


HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\UserChoice

After deletion:


Method 3: Mandatory specification (only for testing, not guaranteed)

⚠ Windows may be restored in the next update


[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\UserChoice]
"ProgId"="MyTxtEditor"

❌ No Hash, usually ignored or restored


Why does "Choose another app" fail?


Repair system cache (very useful)


taskkill /f /im explorer.exe
del /q "%LocalAppData%\Microsoft\Windows\Explorer\*.db"
start explorer.exe


Sysinternals toolset

Introduction to the toolset

Sysinternals is a free library of advanced system tools developed by Mark Russinovich and now maintained by Microsoft. It allows IT staff or advanced users to deeply explore, manage and troubleshoot the underlying operations of the Windows operating system. This set of tools is recognized as the "Swiss Knife" of Windows system diagnostics.

Core tool classification

The toolset contains more than 70 tools, mainly divided into the following categories:

How to obtain and execute

A great feature of Sysinternals is that most of the tools areGreen installation-free, you can use it in the following three ways:

1. Official website download

Download the entire thing from Microsoft’s official websiteSysinternals SuiteZip file, or download the required tools separately.

2. Sysinternals Live (fastest way)

Microsoft provides a network share path that allows you to execute the tool directly without downloading it. In Windows File Explorer or CMD enter:

\\live.sysinternals.com\tools\du.exe
\\live.sysinternals.com\tools\procexp.exe

3. Install using winget

winget install Microsoft.SysinternalsSuite

Commonly used tools comparison table

Tool name Function description Applicable situations
Process Explorer Replace job manager Find out which program is hogging files and see what's causing your CPU spikes.
Autoruns General inspection of startup items Remove rogue software or check the cause of slow startup.
ProcMon behavior monitoring record The specific locations where the troubleshooter reports "Path Not Found" or "Access Denied" errors.
TCPView Connection monitoring See which programs are secretly connecting to the network.

Precautions for use



microsoft.exe

What are Sysinternals du?

This is a disk usage (Disk Usage) tool officially provided by Microsoft and is part of the Sysinternals tool set. Its functionality is similar to that of LinuxduSimilar, but designed for the Windows NTFS file system and can handle it more accuratelySymbolic LinksHard Linksas well asCompressed archive

Download and install

winget install Microsoft.Sysinternals.DiskUsage

Description of common parameters

parameter illustrate
-c Output results in CSV format (suitable for importing into Excel).
-l <number> Specify the recursion depth (e.g.-l 1Only the first level of folders is displayed).
-n Do not recurse into subdirectories (equivalent to only looking at the current level).
-q Quiet mode, does not display banner information (Banner).
-u Count the actual space occupied by "duplicate links".
-v Shows size in KB.

Practical examples

1. Display the size of all first-level folders in the current directory

This is the closest to Linuxdu -h --max-depth=1Usage:

du -l 1

2. View a specific directory and output to CSV

If you need to log the scan results:

du -c C:\Users\YourName\Documents > usage.csv

3. Exclude banner information and view totals

du -q -s C:\Windows

Differences from Linux du



Merge disk partitions

core logic

In Windows, to give space from slot E to slot C, these two partitions must be on the diskadjacent(Slot E follows slot C). Since Slot C is the system drive, it is recommended to follow the steps below. This does not require reinstalling Windows, but it is recommended to back up important data before proceeding.

Method 1: Use Windows’ built-in “Disk Management”

This is the safest method, but only if the E slot is empty since it needs to be deleted first.

  1. pressWin + X,chooseDisk management
  2. Make sure there is no important data in slot E, and(E:)Right click and selectDelete disk volume
  3. After deletion, slot E will become "unallocated" space.
  4. against(C:)Right click and selectExtend disk volume
  5. According to the wizard's instructions, merge all the space just released into slot C.
---

Method 2: Use third-party tools (no need to delete data)

If there is a lot of data in your E slot that you do not want to move, or if there is a "Recovery Partition" between the C slot and the E slot, the built-in tool will not be able to extend it. At this time, third-party tools need to be used for "non-destructive adjustment".

---

FAQ: Stretched disk volume is gray?

If you delete the E slot but the "Extended Volume" of the C slot is still gray, it is usually because there is arepair partition. The processing method is as follows:

context solution
There are other partitions between C and E You need to use a third-party tool to "move back" the repaired partition so that the unallocated space is adjacent to the C slot.
E slot has not been deleted yet The E slot must be deleted first and become "unconfigured" before the built-in tools can be extended.
The disk format is MBR and reaches the 2TB limit Needs to be converted to GPT format.

Advanced tip: Use CMD (Diskpart) to delete a partition

If the disk management interface cannot delete some stubborn partitions, you can use the command:

diskpart
list disk
select disk 0 (confirm your SSD number)
list partition
select partition X (X is the number of slot E)
delete partition override


Handling Repair Disk Partition

Method 1: Use third-party tools (the simplest, lossless data)

This is the most recommended method because Windows built-in tools do not support "moving" partition locations. You can use free software such asAOMEI Partition AssistantorMiniTool Partition Wizard

  1. Install and start the tool.
  2. You will see the layout:[C slot] [Repair partition] [Unallocated space]
  3. right clickRepair partition,chooseMove/Resize Partition
  4. Use your mouse to "drag" the box representing the partition to the far right.
  5. At this point the layout will change to:[C slot] [Unallocated space] [Repair partition]
  6. ClickApplyand wait for restart execution.
  7. Return to Windows Disk Management, right click on the C slot and clickExtend disk volume
---

Method 2: Use commands to delete and repair partitions (advanced, manual recovery)

If you do not want to install third-party software, you can choose to delete the repair partition.Notice:After deletion, you will lose the built-in WinRE repair environment (if the system fails to repair automatically), it is recommended to create a USB boot repair disk first.

1. Deactivate the repair environment

Open CMD as administrator and enter:

reagentc /disable

2. Forced deletion and repair partition

usediskparttool:

diskpart
list disk
select disk 0 (assuming your SSD is disk 0)
list partition
select partition X (X is the number of the repair partition, usually about 500MB~1GB)
delete partition override

3. Extend C-slot

Now that the right side of the C slot is empty, just extend it directly in "Disk Management".

4. (Optional) Rebuild and repair the environment

If you want to keep the repair function, after extending the C slot, you can enter:

reagentc /enable
---

Plan comparison

plan risk advantage
Third party tools Extremely low (error of operation may cause power outage) Intuitive, no instructions required, retains repair function.
Diskpart Delete Medium (lost built-in repair mode) No need to install software, completely remove obstacles.


Windows Phone Connect Software

Phone Link

Link to Windows

AirDroid

Pushbullet

Snapdrop



Usage of Windows built-in mobile link

Preparation

Step 1: Turn on mobile link on Windows

Step 2: Install and configure "Connect to Windows" on your phone

Step 3: Pair your phone and computer

Step 4: Get started

Things to note



WebCam

1. Basic functions of WebCam

2. Setup and installation

3. Camera application software

4. Tips for improving image quality

5. Security and privacy protection

6. Frequently Asked Questions and Solutions


  • WebCam

    Card reader shown but no smart card visible

    If you can see the "Smart Card Reader" in Device Manager but not the smart card, it may be because the smart card is not recognized correctly or there is a problem with the driver. Here are some common workarounds:

    1. Confirm that the smart card is inserted correctly

    2. Check the smart card reader driver

    3. Confirm smart card driver

    4. Verify that the smart card is activated

    5. Verify that the smart card is functioning properly

    6. Use Windows Smart Card Service

    7. Check for operating system updates

    The above method should help solve the problem where the smart card reader is displayed in the device administrator but the smart card cannot be seen.



    Linux

    Linux version comparison

    1. Ubuntu

    Ubuntu is a Debian-based Linux distribution suitable for beginners. It has large community support and friendly user interface. Suitable for personal desktop use, server or development purposes.

    2. CentOS Stream

    CentOS Stream is a rolling update version of Red Hat Enterprise Linux (RHEL) suitable for server and enterprise environments.

    3. Fedora

    Fedora is a Linux distribution sponsored by Red Hat that has the latest features and technologies for developers and technology enthusiasts.

    4. Debian

    Debian is a veteran Linux distribution known for its stability and open source ethos, suitable for both server and desktop use.

    5. Arch Linux

    Arch Linux 是一个滚动更新的发行版,面向高阶用户。 Its KISS principle (Keep It Simple, Stupid) gives users complete control over the system.

    6. openSUSE

    openSUSE is available in two versions: Leap and Tumbleweed. Leap is a stable version and Tumbleweed is a rolling update version.

    7. Manjaro

    Manjaro is a Linux distribution based on Arch, but optimized for beginners, providing a simpler installation and usage experience.



    Install Linux

    1. Preparation

    Before installing Linux, you need to complete the following preparations:

    2. Create a bootable USB flash drive

    Use the following steps to burn the ISO file to a USB flash drive:

    3. Start the installer

    Follow these steps to start the Linux installer:

    4. Install Linux

    During the installation process you need to complete the following steps:

    5. Complete the installation and reboot

    Once the installation is complete, follow these steps for final setup:

    6. Recommended actions after installation is complete

    After the new system is installed, you can consider the following operations to optimize the user experience:



    Check current Linux version

    View release version (most commonly used)

    cat /etc/os-release

    For example:

    NAME="Ubuntu"
    VERSION="22.04.3 LTS"
    ID=ubuntu
    PRETTY_NAME="Ubuntu 22.04.3 LTS"
    
    ---

    Just look at the pretty output (recommended)

    lsb_release -a

    Output example:

    Distributor ID: Ubuntu
    Description:    Ubuntu 22.04.3 LTS
    Release:        22.04
    Codename:       jammy
    
    ---

    Check the Linux kernel version (Kernel)

    uname -r

    Output:

    5.15.0-97-generic
    ---

    View complete system information

    uname -a

    It will include core version, architecture, compilation time and other information.

    ---

    View CPU/Architecture

    uname -m

    For example:

    x86_64
    ---

    Check Debian / Ubuntu version (another way)

    cat /etc/issue
    ---

    Check CentOS / RHEL / AlmaLinux / RockyLinux version

    cat /etc/redhat-release
    ---

    FAQ



    Linux backup

    Use tar to create a full system backup

    Can be usedtarThe command packs the entire system into a compressed archive. It is recommended to execute it in single-player mode or enter rescue mode to ensure that the files will not change during the backup process.

    sudo tar --exclude=/proc --exclude=/tmp --exclude=/mnt --exclude=/dev --exclude=/sys \
    --exclude=/run --exclude=/media --exclude=/lost+found -cvpzf /mnt/backup/system-backup.tar.gz /

    illustrate:

    Using rsync for image backup

    rsyncCan be used to make system images and keep directories synchronized.

    sudo rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /mnt/backup

    illustrate:

    Using Clonezilla

    ClonezillaIt is an open source disk image backup tool that can back up the entire disk or specific partitions.

    1. Download the Clonezilla ISO and create a bootable USB.
    2. Reboot from USB.
    3. choosedevice-imageMode backup to external device or network.
    4. Follow the instructions to select the source partition and storage destination.

    Using Timeshift (for desktop systems)

    TimeshiftSuitable for desktop users, supports snapshot and restore functions.

    1. Install:sudo apt install timeshift(Debian/Ubuntu)
    2. implement:sudo timeshift-gtkorsudo timeshift --create
    3. Select backup method (RSYNC or BTRFS), snapshot frequency and storage location.

    Recommended actions after backup



    Linux mounts Windows network shared folder

    Install necessary packages

    Install firstcifs-utils, which is the tool needed to mount a Windows shared directory:

    sudo apt update
    sudo apt install cifs-utils

    Create a mounting directory

    Select or create a mount point, for example:

    sudo mkdir -p /mnt/windows_share

    Mount shared folder

    Use the following command to mount:

    sudo mount -t cifs //192.168.1.100/share_name /mnt/windows_share \
    -o username=your_username,password=your_password,domain=YOUR_DOMAIN,iocharset=utf8,file_mode=0777,dir_mode=0777

    illustrate:

    Add the mount settings to fstab for automatic mounting at boot

    It is recommended to write the password into the certificate file to improve security:

    sudo nano /etc/samba/creds

    The content is as follows:

    username=your_username
    password=your_password
    domain=YOUR_DOMAIN

    Modify permissions:

    sudo chmod 600 /etc/samba/creds

    edit/etc/fstab

    sudo nano /etc/fstab

    join in:

    //192.168.1.100/share_name /mnt/windows_share cifs credentials=/etc/samba/creds,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

    Test mount

    sudo mount -a

    If there is no error message, the mount is successful.



    APT suite management tool

    Basic concepts

    APT (Advanced Package Tool) is a commonly used package management tool for Debian and its derivative systems (such as Ubuntu, ChromeOS Linux containers). It is used to automate the installation, upgrade, removal of software, and solve package dependency issues.

    Common commands

    Differences between APT and dpkg

    Practical suggestions



    iconv encoding conversion tool

    Introduction

    iconvIt is a tool used for text file encoding conversion, commonly used to convert Big5, GB2312, UTF-8, UTF-16, etc. to each other.

    basic grammar

    iconv -f original encoding -t target encoding input.txt -o output.txt

    Common encoding names

    example

    1. Convert Big5 to UTF-8

    iconv -f BIG5 -t UTF-8 input.txt -o output.txt

    2. Convert UTF-8 to Big5 (direct override)

    iconv -f UTF-8 -t BIG5 input.txt > tmp.txt && mv tmp.txt input.txt

    3. File embedded pipeline conversion

    cat input.txt | iconv -f UTF-8 -t BIG5 | less

    Detect file encoding

    iconv itself does not have automatic detection function, it can be used withfileoruchardetuse:

    file -i input.txt
    uchardet input.txt

    Handle failed transcoding (ignore errors)

    iconv -f BIG5 -t UTF-8 -c input.txt -o output.txt

    -cIndicates that characters that cannot be converted are ignored

    Things to note



    Ubuntu UI

    GNOME desktop environment

    Ubuntu uses GNOME as its desktop environment by default. This is an intuitive and modern graphical interface, and the design concept emphasizes simplicity and focus. The interface mainly consists of the top status bar, the left activity bar, and the full-screen application launcher.

    Event Navigation and Sidebar (The Dock)

    The vertical bar on the left side of the screen, called the Dock, holds frequently used application icons. As the application executes, a marker will appear below the icon. Users can adjust the order by dragging, or right-click to pin apps to the Dock. Click the nine-dot icon at the bottom of the Dock to open the list of all programs.

    Top Bar

    The bar at the top of the screen contains the following functions:

    Window management and workspace

    Ubuntu supports multiple workspaces, allowing users to place different types of tasks on different virtual desktops. You can quickly switch windows by pressing the Super key (usually the Windows key on your keyboard). The windows have an automatic snapping function. Drag the window to the edge of the screen to automatically fill half of the screen, making it easier to process tasks side by side.

    Archivist (Nautilus)

    The default file manager provides a simple navigation experience. The left sidebar displays commonly used folders (such as files, pictures, downloads) and integrates cloud storage spaces such as Google Drive. It supports paginated browsing function, allowing users to manage multiple paths in a single window.

    Appearance customization

    Users can freely switch between light mode and dark mode through the appearance options in system settings. In addition, Ubuntu allows you to adjust the theme accent color (Accent Color), and customize the position of the Dock (bottom, left or right) and whether to automatically hide it, providing a high degree of personalization flexibility.



    GNOME desktop environment

    Core features

    GNOME is one of the most popular desktop environments among Linux distributions (default choice for Debian, Ubuntu, Fedora). It emphasizes simplicity, focus and modern user experience, and its design logic is significantly different from the traditional Windows window layout.

    Main components and tools

    Component name Function description
    GTK Graphical toolkit for building GNOME interfaces.
    Mutter Window manager and Wayland compositor.
    GNOME Shell The core of the graphical interface for direct user interaction (top bar, search function, etc.).
    Gnome Tweaks Essential tool for adjusting fonts, themes and advanced settings.

    Commonly used shortcut keys

    Custom suggestions

    If you are accustomed to using Windows, it is recommended to install the following extensions to optimize GNOME:

    1. Dash to Dock: Convert the sidebar to a Dock fixed at the bottom.
    2. AppIndicator Support: Display the icon of the background program in the top column.
    3. Arc Menu: Provides traditional start menu.

    Version confirmation command

    To confirm the currently installed GNOME version in the terminal, you can use the following command:

    gnome-shell --version


    GNOME desktop shortcut creation

    Using the desktop entry point file (.desktop)

    In Debian or other Linux distributions using GNOME/KDE, desktop shortcuts are created via.desktopdefined by the file. This file is usually generated in the system directory after VS Code is installed, you just need to copy it to the desktop.

    1. Copy existing profile

    Open a terminal and execute the following command to copy the system's VS Code shortcut to your desktop folder:

    cp /usr/share/applications/code.desktop ~/Desktop/

    2. Grant execution permissions

    After copying, you need to give the file execute permissions, otherwise it may be treated as a plain text file:

    chmod +x ~/Desktop/code.desktop

    3. Allow startup (for GNOME users)

    If you are using the GNOME desktop environment, the icon may appear as a gear or have a warning sign after copying. Please click on the icon on your desktopRight click, then select"Allow Launching". The icon will then change to the correct VS Code logo.

    Manually create shortcut files

    If the file cannot be found in the above path, you can create one manually. Enter in the terminal:

    nano ~/Desktop/vscode.desktop

    Then paste the following:

    [Desktop Entry]
    Name=Visual Studio Code
    Comment=Code Editing. Refined.
    GenericName=Text Editor
    Exec=/usr/bin/code --unity-launch %F
    Icon=vscode
    Type=Application
    StartupNotify=true
    StartupWMClass=Code
    Categories=Utility;TextEditor;Development;IDE;
    MimeType=text/plain;inode/directory;application/x-code-workspace;

    Save and exit (Ctrl+O, Enter, Ctrl+X), then do the samechmod +xinstruction.

    Create a symbolic link (Symbolic Link)

    Another quick method is to create a soft link. Although the icon display effect on some desktops is not as complete as the .desktop file, the operation is the easiest:

    ln -s /usr/bin/code ~/Desktop/VSCode

    Method comparison table

    method advantage shortcoming
    Copy .desktop file Display the complete icon and right-click menu function. You need to click "Allow startup" additionally.
    Create files manually Startup parameters (such as working directory) can be customized. The content is complicated and prone to typos.
    Symbolic link (ln -s) The instructions are the simplest. The icon may just be a normal executable file icon.


    Ubuntu screen lock and logout

    Adjust screen auto-off time

    By default, Ubuntu turns off the screen and enters a locked state after a period of inactivity, which is often mistaken for automatic logout. To adjust or turn off this feature, follow these steps:

    Turn off automatic screen lock

    You can set the system not to automatically lock even when the screen is off, so you don't need to enter your password when you turn the screen back on:

    Adjust auto-pause settings

    If your system automatically enters sleep or pause mode, it will also require you to log in again:

    Prevent remote connections from automatically disconnecting

    If you find that your remote connection via SSH is automatically disconnected, this is usually due to a timeout setting on the server. You can modify your connection settings to keep them working:



    Ubuntu uses Chinese input method

    Install Chinese input method framework

    Ubuntu usually defaults to usingIBusorFcitxAs an input method framework, here we use the commonFcitx5For example:

    sudo apt update
    sudo apt install fcitx5 fcitx5-config-qt fcitx5-chinese-addons

    Set input method environment variables

    Open the environment profile (depending on the shell used, it may be~/.xprofile~/.profileor~/.bashrc):

    nano ~/.xprofile

    Add the following:

    export GTK_IM_MODULE=fcitx5
    export QT_IM_MODULE=fcitx5
    export XMODIFIERS="@im=fcitx5"

    Restart the system or log out

    For the settings to take effect, it is recommended to restart or log out and then log in again.

    Turn on Fcitx5 settings

    Clickapplication menu→ SearchFcitx5 Configuration, after turning it on, press+Added input method.

    Search and add one of the following input methods:

    Switch input method

    The default switching shortcut key isCtrl + Space, can be modified in Fcitx5 settings.

    Other alternatives

    If you prefer other input method frameworks, you may also consider:



    Install and use the row and column input method in Ubuntu

    What is row-row input method?

    The row-column input method is a root-based Chinese input method widely used in Taiwan. It supports fast input of Traditional Chinese and is suitable for users who are familiar with keyboard layout.

    Use Fcitx5 to install the row and column input method

    1. Install the Fcitx5 framework and Chinese extension kit:
    2. sudo apt update
      sudo apt install fcitx5 fcitx5-config-qt fcitx5-chinese-addons
    3. Set input method environment variables:
    4. nano ~/.xprofile

      Add the following:

      export GTK_IM_MODULE=fcitx5
      export QT_IM_MODULE=fcitx5
      export XMODIFIERS="@im=fcitx5"
    5. Log out and back in, or restart the system.
    6. turn onFcitx5 settings(Fcitx5 Configuration), press+Add input method.
    7. searchranksorArray, then select Join.

    Use row and column input method

    Other input method framework options

    If you are using IBus, consider installing Rime to support queues:

    sudo apt install ibus-rime

    After starting IBus and setting up Rime, you can also enable the "Range" scheme in it.

    Rime input method enables column scheme

    1. Edit profile:~/.config/fcitx5/rime/default.custom.yamloribusrime under the path.
    2. Add the following to enable:
    3. patch:
        schema_list:
          - schema: array30
    4. Redeploy input method: pressCtrl + `Call the Rime menu and select Redeploy.


    Check input method framework

    Method 1: Use environment variable checking

    Open the terminal and enter the following command:

    echo $XMODIFIERS
    echo $GTK_IM_MODULE
    echo $QT_IM_MODULE

    Output result example:

    Method 2: Check the starting input method program

    Enter the following command to view the currently executed input method related programs:

    ps aux | grep -E 'ibus|fcitx'

    Example results:

    Method Three: Graphical Interface Check

    Check the input method setting method in "Settings":

    1. Open "Settings" → "Region & Language"
    2. Check if the input source shows IBus or Fcitx

    Method 4: Use the im-config tool

    Install and executeim-configtool:

    sudo apt install im-config
    im-config -m

    The currently used input method framework will be displayed, for example:

    default missing
    IBus is selected

    Switch input method framework

    To switch, execute:

    im-config

    Select the input method framework to be used in the graphical interface (such as Fcitx, IBus, None, etc.), select and log in again.



    Ubuntu desktop executable shortcut

    Overview

    To create a shortcut ($\text{Launcher}$) on the Ubuntu desktop that executes a specific $\text{.sh}$ script when clicked, you need to create a $\text{.desktop}$ file. This file is a standard desktop project configuration file specified by $\text{freedesktop.org}$.

    The following assumes that your script $\text{b.sh}$ is located in your "home directory" ($\text{Home Directory}$) and you want to execute the script in the terminal.

    ---

    Step 1: Make sure the script is executable

    First, you must ensure that the $\text{b.sh}$ file itself has execute permissions.

    
    chmod +x ~/b.sh
    
    

    (Note: $\text{\~}$ represents your home directory, such as $\text{/home/username/}$)

    Step 2: Create a .desktop shortcut file

    You can use any text editor (such as $\text{gedit}$ or $\text{nano}$) to create a new file on your desktop and name it $\text{b.sh.desktop}$ (the name can be customized, but must end with $\text{.desktop}$).

    
    nano ~/Desktop/b.sh.desktop
    
    

    Copy and paste the following into the file:

    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=true
    Name=Execute b.sh script
    Comment=Click on the b.sh file in the executor home directory
    Exec=/bin/bash -c "cd ~ && ./b.sh"
    Icon=utilities-terminal
    Categories=Application;Utility;
    
    ---

    Step 3: Description of each parameter

    parameter illustrate
    Type=Application Defines this file as an application launcher.
    Terminal=true **Must be set to $\text{true}$**. This will tell the system to open a terminal window to run the script when the command is executed so that you can see the output of the script.
    Name The name that appears below the desktop shortcut icon.
    Exec **Define the instructions to be executed**. Here, we use $\text{/bin/bash -c "cd \~ \&\& ./b.sh"}$ to ensure that the script is executed correctly in your home directory.
    Icon Set an icon for the shortcut. You can specify the name of the system's built-in icon (such as $\text{utilities-terminal}$), or specify the full path to an icon file (such as $\text{/path/to/my/icon.png}$).
    ---

    Step 4: Authorize and trust the launcher

    In most modern Ubuntu or $\text{Gnome}$ environments, when you place a $\text{.desktop}$ file on the desktop, the system may initially treat it as just a text file for security reasons.

    1. **Right-click**: Right-click on the $\text{b.sh.desktop}$ file you created.
    2. **Select Properties**: Enter the file properties window.
    3. **Permissions Tag**: Check the option "Allow executing file as program" ($\text{Allow executing file as program}$).
    4. **Trust Launcher**: Double-click the $\text{b.sh.desktop}$ file. The system may pop up a dialog box asking you if you want to "Trust and Launch" ($\text{Trust and Launch}$) this file. Click OK.

    After completing the above steps, the icon on the desktop should display correctly, and double-clicking it will open a terminal window and execute your $\text{b.sh}$ script.



    Service restart verification

    Problem description

    When you try to run on Ubuntu or other Linux systems using systemd, usesystemctl restart [email protected]When you run the command to restart the Chrome Remote Desktop service, you will be prompted for authentication (that is, asking for a password). This is because the restart operation of the service is considered a system-level operation that requires elevated privileges.

    Solution: Use Polkit to set up password-free operation

    To allow your users to restart this specific service without requiring a password, you can create a local authorization rule through Polkit (PolicyKit). Polkit is responsible for controlling how unprivileged programs communicate with privileged programs, and is the standard way of handling such permission prompts.

    Step 1: Create a Polkit rules file

    exist/etc/polkit-1/localauthority/50-local.d/Create a new rules file in the directory. we use99-chrome-remote-desktop-restart.pklaAs a file name (the file name can be customized, but it is recommended to use.pklaend):

    sudo nano /etc/polkit-1/localauthority/50-local.d/99-chrome-remote-desktop-restart.pkla

    Step 2: Add new rule content

    In this file, paste the following content. This rule allows foradmingroup (orsudogroup (the exact group name depends on your Ubuntu version and configuration) to restart the service without requiring a password:

    [Allow user to restart chrome-remote-desktop service]
    Identity=unix-group:sudo
    Action=org.freedesktop.systemd1.manage-units
    ResultAny=yes
    ResultInactive=yes
    ResultActive=yes

    Step 3: Save and exit

    store.pklaarchive and exit the editor.

    Step 4: Reload Polkit or reboot the system

    In order for Polkit to load the new rules immediately, you may need to restart the Polkit service, or more reliably, restart the system:

    sudo systemctl restart polkit.service

    Or, if a simple service restart doesn't work, restart the entire system.

    Step 5: Verify password-free execution

    Now you can try executing the reboot command again and the password should no longer be asked:

    systemctl restart [email protected]

    Please note that the above settings are user (or group) and service specific. This will not affect other operations that require administrator privileges.



    Set boot delay execution script

    Method overview

    In Ubuntu systems, there are many ways to set a delay of a few seconds to execute scripts after booting. The most modern, reliable, and recommended method is to use systemd's Service Unit because it can precisely control execution timing and latency.

    Recommended method: Use Systemd service unit

    This method involves creating a systemd service file that specifies to wait a specific number of seconds after system startup is complete (or a certain goal is reached) before executing your script.

    Step 1: Confirm script path and permissions

    Assume your scriptb.shstored in/usr/local/bin/, and executable permissions have been set:

    sudo chmod +x /usr/local/bin/b.sh

    Step 2: Create Systemd service profile

    exist/etc/systemd/system/Create a new service file in the directory, for examplerun-bsh.service

    sudo nano /etc/systemd/system/run-bsh.service

    Step 3: Set up service content

    Paste the following into your service profile. we useExecStartPreto implement the delay function.

    [Unit]
    Description=Delayed execution of b.sh script
    After=network.target multi-user.target
    
    [Service]
    Type=oneshot
    # Set the delay seconds, here set the execution delay of 15 seconds after booting
    ExecStartPre=/bin/sleep 15
    #Specify the script path to be executed
    ExecStart=/usr/local/bin/b.sh
    
    [Install]
    WantedBy=multi-user.target

    Step 4: Enable and start the service

    After saving the file, you need to tell systemd to reload the configuration and enable the new service so that it runs automatically on every boot:

    sudo systemctl daemon-reload
    sudo systemctl enable run-bsh.service

    Now, after restarting the system,b.shIt will be executed with a delay of 15 seconds after power on.

    Alternate method: crontab's @reboot combined with sleep

    If you prefer to usecronscheduler, which can also be combined with@rebootoptions andsleepCommand to achieve:

    1. Open the user's crontab editor:
      crontab -e
    2. Add the following line at the end of the file, for example, delay execution for 20 seconds:
      @reboot /bin/sleep 20 && /usr/local/bin/b.sh &

    This method will be executed when the system starts, and then delays execution for 20 seconds before executing the script. Pay attention to the ending&Symbol, indicating to let the script execute in the background to avoid blocking cron tasks.



    VirtualBox installation Ubuntu default password

    Default password source

    If you installed Ubuntu in VirtualBox usingUnattended Installationfunction, VirtualBox will automatically create a file namedvboxuserof users.

    In most cases, the default password is:

    changeme

    Why does this account appear?

    This is the default setting of VirtualBox designed to simplify the installation process. When you click "New" virtual machine, if you have not changed the account information in the "Auto-Install" tab, the system will apply the default values:

    What if the default password is invalid?

    If you trychangemeBut unable to log in, please check the following points:

    How to change password

    After successfully logging in, for security reasons, it is recommended that you change your password immediately. You can open Terminal and enter:

    passwd

    You will be asked to enter your old password (changeme) and then set your new password.

    How to avoid automatically creating users

    If you wish to set your own username and password during the installation process, please check the box when creating the virtual machine.Skip Unattended Installation(Skip automatic installation) option. The system will then guide you to the traditional Ubuntu installation screen, allowing you to manually enter customized account information.

    The default mechanism for the root account in Ubuntu

    In Ubuntu systems (including versions installed through VirtualBox),The root account has no password by default, and is locked.

    This does not mean that the password is "blank", but that the system does not allow direct login as root. Ubuntu is designed throughsudocommand to allow general users with administrator rights (such as yourvboxuser) to perform tasks that require high privileges.

    How to execute commands that require root privileges

    When you need to execute a system management command, please addsudo. What you will be asked to enter isPassword for your current account (vboxuser), that ischangeme

    sudo apt update

    If you really need to switch to root identity

    If you wish to switch to a terminal environment with root privileges, use the following command:

    sudo -i

    Likewise, the system will ask forvboxuserpassword (changeme), your prompt character will becomeroot@ubuntu:~#

    How to set a password for root (not recommended)

    Although this is not recommended for security reasons, if you do need to set a unique password for root, you can use the following command:

    sudo passwd root
    1. Enter your current password (changeme)。
    2. Enter the new password you want for root (you need to enter it twice to confirm).

    Summarize



    Ubuntu terminal cannot be opened

    Common cause analysis

    In Ubuntu under VirtualBox environment, the terminal cannot be opened (no response after clicking the icon or the window crashes), which is usually related to the following reasons:

    Solution 1: Use TTY interface to fix the language (most effective)

    Since you cannot open a terminal window now, we need to enter "text-only mode" to execute the repair instructions.

    1. In the virtual machine window, clickCtrl + Alt + F3(or F4~F6). This will switch to the TTY3 text login screen.
    2. Enter usernamevboxuserand press Enter. Or log in directly as root.
    3. Enter passwordchangeme(Characters will not be displayed while typing) and press Enter.
    4. After successfully logging in, enter the following command to reset the language:
      sudo localectl set-locale LANG=en_US.UTF-8
    5. After execution, pressCtrl + Alt + F1(or F2) returns to the graphical interface.
    6. Restart the computer or log out and then log in again, and try to open the terminal.

    Solution two: Disable 3D acceleration

    If the window environment is unstable and the program cannot be started, try turning off hardware acceleration.

    Solution three: Install an alternative terminal (xterm)

    If GNOME Terminal is damaged, you can first install a basic terminal tool to troubleshoot the problem.

    1. Also enterCtrl + Alt + F3text interface and log in.
    2. Execute the installation instructions:
      sudo apt update && sudo apt install xterm
    3. Return to the graphical interface and search in the applicationxtermand turn it on. If xterm can be opened, it means that the original gnome-terminal configuration file is damaged.


    Packing and decompression using tar command

    what is tar

    tar is a commonly used tool in Linux and Unix systems for packaging and decompressing archives. The original meaning of tar is "tape archive", which can integrate multiple files and folders into one file (usually a .tar file) for easy transfer or backup.

    basic grammar

    The basic instruction format of tar is as follows:

    tar [options] file name

    Common options include:

    Example: Create tar package

    Suppose there is a file calledmy_folderfolder that you want to package intoarchive.tar

    tar -cvf archive.tar my_folder

    After execution, a file namedarchive.tarThe tar package containsmy_foldercontent.

    Example: Decompressing a tarball

    To unziparchive.tar, use the following command:

    tar -xvf archive.tar

    After decompression,my_folderThe contents will be restored to the current directory.

    Example: Creating a gzip-compressed tarball

    To simultaneously package and compress an archive into a gzip-formatted archive (.tar.gz), use-zOptions:

    tar -czvf archive.tar.gz my_folder

    This command will generatearchive.tar.gz, including compressedmy_folder

    Example: Decompressing a gzip-formatted tar file

    To unziparchive.tar.gz, use the following command:

    tar -xzvf archive.tar.gz

    This command will decompress the file and restoremy_foldercontent.

    More advanced operations

    in conclusion

    tar is a powerful tool that can package and compress archives, suitable for backup and archive transfer. Familiarity with the basic syntax and common options can help you manage files more efficiently on your Linux system.



    File batch rename

    Example: Batch rename files

    Assume our file name is in the following format:

    file1,data1.txt
    file2,data2.txt
    file3,data3.txt
        

    We want to extract the first part of each line as the new file name.

    Step 1: Prepare files

    First, make sure you have an archive (e.g.filenames.txt), which contains the name of the file that needs to be renamed:

    file1,data1.txt
    file2,data2.txt
    file3,data3.txt
        

    Step 2: Create a Bash script

    The following is an example Bash script for batch renaming:

    #!/bin/bash
    
    # Read each line in the file
    while IFS=, read -r new_name old_name; do
        # Check if the old file exists
        if [ -f "$old_name" ]; then
            # Use the mv command to rename the file
            mv "$old_name" "$new_name.txt"
            echo "'$old_name' has been renamed to '$new_name.txt'"
        else
            echo "File '$old_name' does not exist."
        fi
    done < filenames.txt

    Step 3: Execute the script

    1. Save the above script asrename_files.sh
    2. Grant execution permissions:
      chmod +x rename_files.sh
    3. Execute the script:
      ./rename_files.sh

    illustrate

    Method 2 - using cut



    How to use the bc instruction

    What is BC?

    bc is a "basic calculator" (Basic Calculator), which is the abbreviation of Linux and Unix The system's command line tool for mathematical operations. It supports high-precision arithmetic operations and can handle floating point numbers, variables and conditional operations. It is a powerful tool for performing fast calculations.

    How to start bc

    To start bc, type directly in the terminal:

    bc

    After starting, you can enter expressions in the command line, for example:

    3 + 5

    pressEnterAfter that, you can get the result.

    Basic usage of bc

    Handle floating point numbers

    bc does not support floating point operations by default and needs to be setscaleSpecify the number of decimal places. For example:

    scale=2
    5 / 3

    The result is1.66

    Use variables

    bc supports variable assignment and operations. For example:

    a=10
    b=20
    a + b

    The result is30

    Calculate decimal exponent

    bc does not directly support decimal exponentiation, but can use natural logarithms (l()) and the exponential function (e()) to achieve. For example, calculate2^3.5

    scale=5
    e(3.5*l(2))

    The steps here are as follows:

    1. usel(2)Calculate the natural logarithm of 2.
    2. Multiply the natural logarithm by the exponential value (3.5).
    3. usee()Calculate the exponential value of the natural logarithm and get the result.

    The execution result will be a high-precision decimal.

    Advanced operations

    Example: Single row operation

    Single-line operations can be performed directly in the terminal. For example:

    echo "scale=5; e(3.5*l(2))" | bc -l

    The result is the result of the exponential operation in decimal format.

    in conclusion

    bc is a powerful and flexible tool that can not only perform basic arithmetic operations, but also handle advanced conditional and function calculations, including complex operations such as decimal exponents. Familiarity with the bc command can help you quickly complete various computing tasks in Linux systems.



    bc command update

    Since performance bottlenecks in GNU bc have existed for many years, many modern systems have moved to using GNU bc developed by Gavin Howardgh-bc. If you find that your Chromebook or computer is running too slowly, you can update or replace it as follows.


    1. Chromebook (ChromeOS / Crostini)

    Chromebooks' Linux container defaults are based on Debian, which typically installs an older version of GNU bc. You can try to obtain a high-performance version through source code compilation:


    2. Cygwin (Windows)

    bc in the Cygwin package repository is updated slowly. To improve performance, it is recommended to directly switch to the Windows native high-performance version to avoid Cygwin's simulation loss:


    3. Comparison table of versions of each platform

    version name Common environment Performance characteristics
    GNU bc Older versions of Linux, Cygwin, macOS The most versatile, but extremely slow when performing large number operations (high scale).
    gh-bc (Gavin Howard) Android (Termux), FreeBSD extremely fast. Optimized for algorithms and supports modern hardware acceleration.
    BusyBox bc Embedded systems, lightweight Linux Small size, medium speed, suitable for basic calculations.

    4. The ultimate solution: switch to Python testing

    If you can't replacebcversion, but if you want to conduct a fair "computing performance test" across different devices, it is recommended to discard it.bc, switch to one that is available on all platforms and implemented consistentlyPython 3. Python's large integer operations are highly optimized, and its performance across platforms is more valuable for reference:

    time python3 -c "import sys; sys.set_int_max_str_digits(0); print(2**500000)" > /dev/null

    How to confirm the update is successful?

    Execute the following command to check the output information:



    Default format for date

    Specify output format once

    date "+%Y-%m-%d %H:%M:%S"
    

    Common format examples

    # year-month-day
    date "+%Y-%m-%d"
    
    # hours:minutes:seconds
    date "+%H:%M:%S"
    
    # Full format
    date "+%Y-%m-%d %H:%M:%S"

    Set default format permanently

    # Method 1: Define alias in the shell startup file (.bashrc or .zshrc)
    echo 'alias date="date \"+%Y-%m-%d %H:%M:%S\""' >> ~/.bashrc
    source ~/.bashrc
    
    #Method 2: Create a function (more flexible)
    echo 'date() { command date "+%Y-%m-%d %H:%M:%S" "$@"; }' >> ~/.bashrc
    source ~/.bashrc

    Effect

    # Enter directly after setting
    date
    
    # will output
    2025-09-14 12:34:56


    Date and time subtraction calculation

    Calculate steps using bc instruction

    1. Convert date to seconds. For example, use the `date` command to convert date to Unix timestamp.
    2. Calculate the difference in seconds.
    3. Convert the seconds difference back to day, hour, minute, second format.

    Example operation

    Suppose we want to calculate the difference between 2025-01-11 15:30:00 and 2025-01-10 12:00:00:

    1. Get the Unix timestamp:
      
      $ date -d "2025-01-11 15:30:00" +%s
      1731466200
      
      $ date -d "2025-01-10 12:00:00" +%s
      1731384000
              
    2. Calculate the difference in seconds:
      
      $ echo "1731466200 - 1731384000" | bc
      82200
              
      The difference is 82200 seconds.
    3. Convert seconds to days, hours, minutes, seconds:
      $ echo "82200 / 86400" | bc # days
      0
      $ echo "82200 % 86400 / 3600" | bc #
      22
      $ echo "82200 % 3600 / 60" | bc # points
      50
      $ echo "82200 % 60" | bc # seconds
      0
      The result is 0 days 22 hours 50 minutes 0 seconds.

    Things to note



    use now

    Calculation steps using bc and now

    1. Use the `date` command to convert the target time and now time (now) to a Unix timestamp.
    2. Calculate the difference in seconds.
    3. Convert seconds difference to day, hour, minute, second format.

    Example operation

    Suppose we want to calculate the difference between the current time and 2025-01-10 12:00:00:

    1. Get the Unix timestamp:
      $ date -d "now" +%s
      1731462000 # Assume this is the current time when executing
      
      $ date -d "2025-01-10 12:00:00" +%s
      1731384000
    2. Calculate the difference in seconds:
      
      $ echo "1731462000 - 1731384000" | bc
      78000
              
      The difference is 78000 seconds.
    3. Convert seconds to days, hours, minutes, seconds:
      $ echo "78000 / 86400" | bc # days
      0
      $ echo "78000 % 86400 / 3600" | bc #
      21
      $ echo "78000 % 3600 / 60" | bc # points
      40
      $ echo "78000 % 60" | bc # seconds
      0
      The result is 0 days 21 hours 40 minutes 0 seconds.

    Things to note



    ip command

    Command overview

    ipcommand is a powerful and versatile Linux network configuration tool that replaces several tools used in older versions of Linux such asifconfigroutearpandnetstat)。ipCommand usageiproute2Suite for displaying and manipulating routes, network devices, tunnels, policy routing, etc. Its core advantages are its unified syntax, comprehensive functionality and good support for modern network concepts such as policy routing and multicast.

    basic grammatical structure

    ipThe basic structure of the command is:

    ip [options] [object] [action] [parameters]

    Main objects and common actions

    1. ip addr (IP address management)

    action illustrate example
    show / a Displays IP address information for all network interfaces. ip addr show
    add Adds an IP address to the specified network interface. ip addr add 192.168.1.10/24 dev eth0
    del Removes an IP address from the specified network interface. ip addr del 192.168.1.10/24 dev eth0

    2. ip link (network interface management)

    action illustrate example
    show / l Displays the status of the network interface (including MAC address, MTU, etc.). ip link show
    set Set the status or properties of the network interface. ip link set eth0 up(enable interface)
    set Change the MAC address of the network interface. ip link set dev eth0 address 00:1A:2B:3C:4D:5E

    3. ip route (routing table management)

    action illustrate example
    show / r Display the core routing table. ip route show
    add Add a new route. ip route add default via 192.168.1.1(Add default gateway)
    del Delete a route. ip route del 10.0.0.0/8 via 192.168.1.1

    4. ip neigh (neighbor table/ARP management)

    action illustrate example
    show / n Display neighbor table (equivalent to ARP cache). ip neigh show
    add Add a new static ARP entry. ip neigh add 192.168.1.10 lladdr 00:11:22:33:44:55 dev eth0


    Loopback interface

    Interface definition

    Loopback interface (usually named on Linux systemslo) is a special, virtual network interface. It is not a physical hardware device, but is completely implemented at the software level by the network stack of the operating system. Its main function is to immediately direct network traffic sent to a specific IP address back to the sending host without going through any physical network interface or external network.

    Private IP address

    The Loopback interface is associated exclusively with a set of reserved IP addresses:

    Any traffic on these addresses is handled at the Transport Layer of the TCP/IP stack and directed back to the application layer, never leaving the host system.

    Main uses and functions

    Interface features

    characteristic illustrate
    Link Type loopback(Noether)
    MAC address Disembodied MAC address, usually shown as00:00:00:00:00:00
    MTU (Maximum Transmission Unit) Usually set to the maximum value of 65536, which is much larger than the 1500 of physical Ethernet.
    state Typically remains at system startupUPstate.


    Linux network interface name

    Overview

    In Linux systems, the name of the Network Interface is used to identify and configure network connections. Although $\text{eth0}$, $\text{eth1}$, etc. are traditionally common, in newer releases, due to the adoption of the "Predictable Network Interface Names" mechanism, the names may become $\text{enp0s3}$, $\text{eno1}$ or other hardware or firmware-based names.

    To determine the name of the network interface your system is currently using, you can use a few common commands:

    ---

    Method 1: Use the ip command (recommended)

    The $\text{ip}$ command is the go-to tool for network configuration and inspection on modern Linux systems. It lists the details of all network interfaces.

    
    ip a
    
    

    Result analysis

    ---

    Method 2: Use ifconfig directive (Older but still available)

    On some older or leaner systems, $\text{ifconfig}$ is still a common tool. In many new distributions it has been replaced by the $\text{ip}$ directive and may need to be installed separately.

    
    ifconfig
    
    

    Result analysis

    ---

    Method three: View the /sys/class/net directory

    The network interface name in Linux systems actually corresponds to a subdirectory under the $\text{/sys/class/net}$ directory. You can list the contents of this directory directly to see the names of all interfaces.

    
    ls /sys/class/net
    
    

    Result analysis

    ---

    Apply to your directive

    Once you have determined the correct interface name, for example it is $\text{enp0s3}$, you can replace it in your directive:

    
    sudo ./gev_nettweak enp0s3
    
    


    Ubuntu UI Ethernet Management

    Network management system

    In Ubuntu desktop versions, the graphical tool for managing network connections is NetworkManager. It provides a user-friendly interface that allows users to configure and monitor Ethernet connections without entering commands.

    Graphical interface navigation

    Users can access Ethernet network settings in the desktop environment by following these steps:

    1. Click the system status menu in the upper right corner of the screen (such as the combination area of ​​network, volume, and power icons).
    2. Find and click the "Settings" icon or option in the drop-down menu.
    3. In the left navigation bar of the system settings window, select Network or Connections.

    Ethernet connection configuration

    In the Network panel, the Ethernet interface displays its current status. Click the connection name or the gear icon (⚙️) next to it to open the detailed configuration window of the connection, which contains the following main tabs:

    Integration of underlying systems

    On Ubuntu desktop, NetworkManager is the main management service, which stores configurations in dedicated files (usually/etc/NetworkManager/system-connections/). Although modern Ubuntu systems also use netplan as an abstraction layer for their network configuration (its configuration files are located in/etc/netplan/), but in a desktop environment, the graphical interface operations provided by NetworkManager usually override or take precedence over netplan settings, unless the netplan file is configured to cause NetworkManager to ignore the interface.



    Set IP permanently in Ubuntu

    Set up static IP using Netplan

    In Ubuntu, network settings are stored in/etc/netplan/YAML file in the directory. You need to edit this file to apply permanent settings.

    1. Query the name of the network interface

    Enter the following command in the terminal to confirm the name of your network card (for exampleeth0orenp0s3):

    ip link show

    2. Edit Netplan configuration file

    Open the profile using a text editor such as nano. File names may vary from system to system, usually ending with.yamlending:

    sudo nano /etc/netplan/01-netcfg.yaml

    3. Modify YAML content

    Modify the content to the following format (note the indentation, YAML is very sensitive to spaces):

    network:
      version: 2
      renderer: networkd
      ethernets:
        enp0s3:
          dhcp4: no
          addresses:
            - 192.168.1.100/24
          gateway4: 192.168.1.1
          nameservers:
            addresses: [8.8.8.8, 8.8.4.4]

    4. Apply settings

    After saving and exiting the editor, execute the following command to make the settings take effect immediately:

    sudo netplan apply

    Check variables and status

    Things to note

    If you are using the desktop version of Ubuntu, your network may beNetworkManagermanage. In this case, you can also use the graphical interface ornmclicommand to set. The above Netplan method is mainly suitable for server versions or situations where underlying fixed settings are required.



    Cygwin

    What is Cygwin

    Cygwin is an emulation layer that provides a Linux/Unix environment for Windows. It contains:

    Download and install

    1. Go to the official website:https://www.cygwin.com/
    2. downloadsetup-x86_64.exe(64 bit)
    3. Run the installer and select:
      • Installation path (recommended to be preset)
      • Installation source (it is recommended to choose the network)
      • Mirror site (select the nearest country)
    4. During the package selection stage, you can select common tools according to your needs:
      • bashcoreutils:Basic instructions
      • gccmake: Development tools
      • opensshwget:Network tools

    Basic usage

    After the installation is complete, open "Cygwin Terminal" to use a Linux-like bash shell.

    ls # List directory contents
    cd # change directory
    pwd # Display the current path
    gcc # Compile C program
    make # Compile project

    File system correspondence

    Install or add a package

    To add a new package, re-executesetup-x86_64.exeand check the required tools. It can also be used with the installation script through the command line.

    Common uses

    Things to note



    Linux and Cygwin

    Basic introduction to Linux

    Linux is an open source operating system originally created by Linus Torvalds and built on UNIX design principles. It is known for its stability, security and high degree of freedom, and is widely used in servers, desktop environments and embedded devices. Many well-known Linux distributions such as Ubuntu, Fedora, and Debian, offer different desktop and system environments to meet the needs of various users.

    Main features of Linux

    Basic introduction to Cygwin

    Cygwin is a simulation environment that runs on Windows and is designed to provide UNIX-like functionality. It establishes a POSIX-compliant layer that enables users to execute Linux commands and applications in a Windows environment. Cygwin contains a large number of GNU tools and development environment facilitate developers to conduct cross-platform development on Windows.

    Key features of Cygwin

    Differences between Linux and Cygwin

    Linux is a complete operating system, while Cygwin is just a simulation environment on Windows. Linux provides complete kernel and file system support, while Cygwin relies on the Windows kernel for execution. Although Cygwin can simulate most Linux commands, but differ from Linux in performance and system-level operation.

    When to choose Linux or Cygwin



    Managing Cygwin installation packages - in cmd line

    Check available packages

    In Cygwin, you can usecygcheckTool queries installed packages. This tool allows you to check package names, dependencies and other detailed information, making it easier for users to manage installed packages.

    Command example to query suite:

    cygcheck -c <package_name>

    List all installed packages

    If you want to list all installed packages in Cygwin, you can usecygcheck -cOrder. This command will list all installed packages and their status.

    Command to list installed packages:

    cygcheck -c

    Check whether the specified package is installed

    To check if a package is installed, you can usecygcheck -cSpecify the package name to check. For example:

    cygcheck -c curl

    The above command will checkcurlThe installation status of the package.

    Install new packages

    To install a new package in Cygwin, use the installer setup.exe. Installation can usually be done using setup.exe from the command line. For example, installcurlThe instructions are:

    setup-x86_64.exe -q -P curl

    This command will install in unattended modecurlkit. If it is a 32-bit system, you need to usesetup-x86.exe

    Tips for using the command line management suite



    Cygwin official performance testing tool

    The following tools are available directly through Cygwinsetup-x86_64.exeInstallation does not require manual compilation, and provides performance evaluation capabilities for CPU, I/O and memory respectively.


    1. Bonnie++ (file and hardware I/O testing)

    This is the closest to Sysbench included in Cygwin’s official collectionfileioA model tool specifically designed to test disk read and write speed and file creation performance.


    2. Iozone (Integrated File System Test)

    Iozone is an extremely professional file system benchmarking tool that supports multi-threaded read and write tests, and its functions are even more detailed than Sysbench's fileio.


    3. Coreutils built-in tools (basic computing test)

    If you just want to simply test the CPU operation speed, you can use Cygwin's built-in instructions to perform logical operation tests.


    4. Hdparm (quick check of disk performance)

    AlthoughhdparmThere are more limitations at the bottom of Windows, but in Cygwin it can still be used to view the cache read speed of the disk.


    Tool function comparison table

    Sysbench functional block Cygwin official recommended alternative
    CPU (Prime operation) bc(calculate pi) orfactor(Decomposition of large numbers)
    FileIO (disk read and write) bonnie++oriozone
    Memory (memory bandwidth) Cygwin official library lacks direct tools, it is recommended to useddTest /dev/zero write speed
    Threads (thread scheduling) Installableperlorpython3Run a simple concurrent loop script

    Usage suggestions

    Thanks to Cygwin/dev/The device path corresponds to the physical disk of Windows. When performing I/O testing, it is recommended that the path points to/cygdrive/c/temp/to ensure it is running on a physical disk. If you are pursuing 100% the same benchmark data as Linux, it is recommended to useWSL2, where you can directly install the nativesysbench



    WSL 2

    How WSL 2 works

    WSL 2 is the latest architecture of Windows Subsystem for Linux. Unlike the first generation, which translated Linux system calls into Windows core instructions, WSL 2 includes a real Linux kernel maintained by Microsoft. It operates on lightweight virtualization technology (Hyper-V) and provides complete system call compatibility.

    WSL 2 and Cygwin differences

    The logic of these two tools for running Linux software on Windows is essentially different:

    characteristic WSL 2 Cygwin
    core technology Lightweight virtualization versus a real Linux kernel. Recompile Linux tools into native Windows binaries.
    Binary compatibility Native ELF binary files (such as Ubuntu compiled files) can be executed directly. Only software compiled for the Cygwin runtime environment can be executed.
    File system performance Extremely fast within Linux; access across Windows boundaries is slow. It operates directly on the Windows file system and accesses Windows files at an average speed.
    Hardware acceleration Supports GPU acceleration (NVIDIA CUDA) and direct access to the network layer. Direct access to underlying hardware and complex network filtering are not supported.
    Docker support Perfect execution of the Docker container engine. Docker engine is not supported and can only execute client tools.

    WSL 2 Performance Advantages

    Because WSL 2 uses real cores, it is typically 2 to 20 times faster than the first generation of WSL when performing disk-intensive tasks such as decompressing source code, executing a compiler, or git clone. This makes it the preferred environment for Windows developers today.

    System requirements and installation

    WSL 2 requires Windows 10 (2004 and above) or Windows 11. In the latest system, you can directly execute the following command to install through PowerShell with administrator rights:

    wsl --install

    Select suggestions

    If you need a development environment that is exactly the same as the server environment, or if you want to perform AI training or Docker containers, WSL 2 is the standard choice. If you only occasionally need simple tools such as grep or awk to process text files on Windows, and do not want to turn on the virtualization layer, Cygwin or MSYS2 still has the advantage of being lightweight.



    iOS system

    What is iOS?

    iOS is a proprietary operating system developed by Apple for its mobile devices such as iPhone and iPad. It debuted in 2007 with the release of the first iPhone and has become one of the most popular mobile operating systems in the world.

    Main features

    Common uses

    iOS devices are widely used for a variety of daily and professional needs such as:

    Version history

    Every update to iOS brings new features and improvements. For example:

    Conclusion

    iOS is a constantly evolving operating system that strives to provide users with the best experience and seamlessly integrates with Apple hardware, making it one of the leaders in mobile devices.



    Check device information in iOS

    Method 1: Use the Settings app

    1. Open thesettingsapp.
    2. Scroll down and clickgenerally
    3. chooseAbout this machine
    4. The device model can be found in the Model Name or Model Number fields.

    Method 2: Use the support page of Apple’s official website

    1. Note the model number shown on the back of the device or in About This Mac, for exampleAxxxxFormat.
    2. Go to Apple's official device support page.
    3. Search for the model number to confirm device details.

    Method 3: Use a third-party application

    Download asLirum Device Info Liteand other third-party applications that can view detailed information such as the device model, processor, memory, etc.

    Method 4: Query by serial number

    1. existsettingsFind the device's serial number in "About This Mac."
    2. Go to Apple's official websiteService and WarrantyQuery page.
    3. Enter the serial number to get information about the device.


    ChromeBook

    ChromeBook shortcut key list



    Chromebook installs new apps

    Overview

    Chromebooks use Chrome OS and can install apps from multiple sources, including the Google Play Store and the Chrome Web Store. Users can also enable the Linux (Beta) feature to install Linux Applications to meet different work and entertainment needs.

    Install apps from Google Play Store

    1. Click the "Launcher" icon in the lower left corner of the screen.
    2. Search for "Play Store" and click to enter.
    3. Enter the app name or category in the search bar.
    4. Once you find the app you want, click Install.
    5. After the installation is complete, the application will appear in the "Launcher" and can be opened by clicking on it.

    Install extensions from the Chrome Web Store

    1. Open the Chrome browser.
    2. Go toChrome Web Store
    3. Search for the extension or app you want.
    4. Click "Add to Chrome" on the apps page.
    5. After you confirm installation, the extension will appear in the Chrome toolbar or app list.

    Enable Linux (Beta) and install Linux applications

    Chromebooks support Linux (Beta) features, allowing you to install and run Linux applications, increasing the functionality of the system.

    1. Open the Settings app.
    2. Click "Linux (Beta)" in the left menu and select "Enable".
    3. Follow the on-screen instructions to perform installation settings.
    4. After the installation is complete, use the Linux terminal to enter commands such assudo apt install [application name]to install the software.

    Install apps from third-party sources

    While the main apps are from the Google Play Store and Chrome Web Store, Chromebooks also support the installation of APK files. Please note that installing applications from third-party sources may present security risks.

    1. Go to Settings and select Security & Privacy.
    2. Enable "Allow installation of applications from unknown sources".
    3. Download the APK file and open it with a file manager to install.

    Conclusion

    Chromebooks offer multiple ways to install apps to meet the needs of different users. Through the Google Play Store, Chrome Online App Store, and Linux (Beta) features, users can easily expand the functionality of their devices to improve productivity and user experience.



    ChromeOS Crostini Shortcut Path

    Preset path analysis

    In ChromeOS's Linux virtual environment (codenamed Crostini), when you open Terminal, the default location is indeed~(Right now/home/yourusername). However, Crostini is a standalone container with a directory structure separate from the ChromeOS native Downloads or My Files.

    Confirm current path

    You can enter the following command to confirm the current absolute path:

    pwd

    If it shows/home/yourusername, then you are in the home directory.

    Why can't I find the Desktop folder?

    The default Linux environment for ChromeOS isMinimalist installation, it does not automatically build like standard desktop LinuxDesktopDocumentsWait for the folder. Even if you create it manually~/Desktop, the ChromeOS desktop interface will not display the icons inside, because the integration of Linux containers and the ChromeOS desktop environment is limited to the application menu.

    How to create a VS Code shortcut in ChromeOS

    Although you cannot place an icon on the ChromeOS desktop, you can make VS Code appear in the ChromeOS Application Launcher (Shelf or Launcher):

    1. Confirm .desktop file location

    After VS Code is installed, the system should have automatically established an entry point:

    ls /usr/share/applications/code.desktop

    2. Let ChromeOS recognize the app

    if only.desktopFile exists in/usr/share/applications/or~/.local/share/applications/, ChromeOS will automatically add it to the search list. Just press on your keyboardSearch key(search icon), enter "Code" to find it.

    3. Pin to the lower toolbar (Shelf)

    After finding the VS Code icon, right-click and select"Pin to shelf", this is the "shortcut" method on ChromeOS.

    Linux and ChromeOS file interoperability

    If you want to access ChromeOS native files on a Linux terminal, the path is as follows:

    Location Path in Linux
    home directory (~) /home/username
    My Files /mnt/chromeos/MyFiles(You need to right-click on the File App and select "Share with Linux")
    Downloads /mnt/chromeos/MyFiles/Downloads

    Summary suggestions

    In ChromeOS,No need to manually create ~/Desktop, because this directory is not reflected in the ChromeOS desktop interface. Please focus on ensuring/usr/share/applications/code.desktopIf the content is correct, then pin it to the toolbar below through system search.



    Chromebook Check CPU and Memory Configuration

    Method 1: Diagnose App (system layer, recommended)

    1. Press search key to enterdiagnosis(Diagnostics), or enter it in the address barchrome://diagnosticsTurn on.
    2. View in the "Memory" sectionTotal memorywith immediate usage.

    Method 2: chrome://system

    Method 3: Crosh (system shell, observable whole)

    1. according toCtrl + Alt + TTurn on Crosh.
    2. enter:
      top
      An overall memory summary (usually shown in MB) is visible at the top of the screen. The display of different models is slightly different.
    3. Also try:
      memory_test
      Obtain memory test information (biased towards health test, not necessarily display the exact total).

    Method 4: Linux (Crostini) container (for reference only)

    Conversion cheat sheet

    FAQ



    Check CPU and memory usage on Chromebook

    Method 1: Use the built-in Task Manager

    Chromebooks have a built-in Task Manager that can be used to view the CPU and memory usage of each application.

    1. pressSearch + Esckey to start Task Manager.
    2. In the window that opens, you can see theCPUandmemoryUsage.

    Method 2: Via Chrome extension

    You can also install Chrome extensions such asSystem MonitororTask ManagerExpand to get more detailed system information.

    1. Open Chrome and go toChrome Web Store
    2. searchSystem Monitor, and then click the "Install" button.
    3. Once installed, you can enable the tool from the extensions bar and view CPU and memory usage.

    Method 3: Using a Linux terminal (if a Linux environment is installed)

    If your Chromebook has a Linux environment enabled, you can use Terminal commands to view system resource usage.

    1. Open the terminal and entertopcommand to view the system's CPU and memory usage.
    2. Alternatively, usehtopcommand (if installed) for a more intuitive interface.


    Chromebook manages local files

    Overview

    Chromebooks use the Chrome OS operating system, which focuses on cloud applications but can also manage and access local files. Users can browse, manage and operate files through the built-in "File" application.

    Using the Files app

    The Files app is your Chromebook's built-in file manager, similar to File Explorer or Finder in other operating systems. Users can view and manage files stored locally on the device or in the cloud in this application.

    How to open and use the Files app

    1. Click the "Launcher" icon in the lower left corner of the screen.
    2. Type "file" in the search bar, or select "file" directly from the list of applications.
    3. Once logged in, you can view different file locations in the left panel, such as My Files, Google Drive, and external devices.

    Basic file operations

    Access and manage external devices

    Chromebooks support external storage media such as USB devices and SD cards. After inserting the device, it will be displayed on the left panel of the "File" application, and you can directly access and operate the files inside.

    Synchronization of cloud and local files

    With Google Drive, Chromebook users can easily sync files between the cloud and their computer. This not only provides additional storage space, but also makes it easy to share and access files between different devices.

    Conclusion

    The Files app for Chromebooks provides a simple and intuitive way to manage local and cloud files. Through it, users can perform basic file operations and access external devices to meet daily file management needs.



    Linux terminal for Chromebook

    Enable Linux development environment

    1. Open "Settings".
    2. Click "Advanced" > "Developer".
    3. Enable "Linux Development Environment (Beta)".
    4. After the installation is completed according to the instructions, a window calledTerminalapplication.

    Features of Linux Containers

    Common command examples

    sudo apt update
    sudo apt install python3
    cd ~
    ls
    

    Share files with ChromeOS

    1. Open the Files application.
    2. Right-click the folder or file you want to share.
    3. Select "Share to Linux".

    After sharing, the terminal can be accessed from the following path:

    /mnt/chromeos/MyFiles

    Application scenarios



    Chromebook's Linux terminal accesses download folder

    Share download folder to Linux

    1. Open the file manager (Files).
    2. Right-click on the "Downloads" folder.
    3. Select "Share to Linux".

    Access the download folder in a Linux terminal

    cd /mnt/chromeos/MyFiles/Downloads

    Browse local files

    cd /mnt/chromeos/MyFiles
    ls

    Create symbolic links for quick access

    ln -s /mnt/chromeos/MyFiles/Downloads ~/Downloads

    It can be used directly afterwards:

    cd ~/Downloads

    Things to note



    Chromebook uses Webapp and Termux to share folders

    Step 1: Install Termux

    Install on your ChromebookTermuxApp, which can be downloaded and installed from the Google Play Store. Termux provides a fully functional Linux environment for executing commands and managing files.

    Step 2: Set up shared folders

    Chromebook users can use Chrome OS’sLinux (Beta)Function to share folders in the system to the Linux environment. The setting steps are as follows:

    1. Click on the lower right corner of the Chrome OS system to entersettings
    2. chooseLinux (Beta), and after turning it on, clickManage shared folders
    3. Select the folder to share and allow Linux access.

    Step 3: Access shared folders in Termux

    In Termux, you can access shared folders by mounting the folder. Execute the following commands to browse and mount the shared folder:

    cd /mnt/chromeos/MyFiles/Downloads

    The above command will direct the user to the Chrome OSDownloadsfolder, or adjust based on the actual shared folder path.

    Step 4: Create a webapp to access the folder

    On Chromebooks, when you use web technologies such as PWA to create a webapp, you can set the application to access files in the same folder through code such as JavaScript.

    // JavaScript example: list folder contents
    fetch('/mnt/chromeos/MyFiles/Downloads')
      .then(response => response.text())
      .then(data => console.log(data));

    in conclusion

    Through the above steps, users can successfully set up a shared folder between Webapp and Termux on Chromebook to achieve file synchronization and access.

    Solution to Termux unable to find /mnt/chromeos on Chromebook

    Problem description

    In some cases Termux may not be able to find/mnt/chromeospath, meaning users cannot directly access the Chrome OS file system. If this happens, you'll need to consider other ways to share files.

    Solution 1: Alternative to using Termux to access shared folders

    If not available/mnt/chromeos, you can achieve folder sharing with Chrome OS through the following methods:

    1. useTermux APIpackage to access files within Android.
    2. Copy the file from Chrome OS to a path accessible by Termux, such as/storage/emulated/0/(i.e. Android's "internal storage space").

    Solution 2: Move the file manually

    If Termux cannot directly access the Chrome OS file system, you can manually move the files from the Chrome OS File Manager to a folder that Termux can read and write, such as:

    Users can copy or move files to these locations through a file manager so that Termux can access them.

    Solution 3: Use cloud sync

    Another solution is to use a cloud service (e.g. Google Drive, Dropbox) to sync files to Termux. For example:

    1. Upload files to the cloud.
    2. Using TermuxwgetorcurlDownload the archive.

    Command example

    # Use Termux to access internal storage
    termux-setup-storage
    cd /storage/emulated/0/Downloads

    This will allow Termux to gain access to the internal storage, allowing files to be read and written to that path.

    in conclusion

    If cannot be found/mnt/chromeosPath, users can solve file sharing problems through other accessible paths or using cloud synchronization.



    Chromebook install bc calculator

    The most orthodox and stable way to use the bc command on a Chromebook is through the built-in Linux development environment. The following are the specific installation and usage steps:


    1. Enable Linux development environment

    If the Linux function has not been enabled, please follow the following path:

    2. Execute the installation instructions

    Open Terminal in the application launcher and enter the following commands in sequence:

    # Update software package list
    sudo apt update
    
    # install bc
    sudo apt install bc -y

    3. Verification and basic operations

    After the installation is complete, you can enter bc directly in the terminal to enter calculation mode. Commonly used techniques are as follows:

    Function Command example
    Start and include the math function library bc -l
    Set the number of decimal places After entering, enter scale=4
    Quickly calculate and exit echo "10/3" | bc -l
    Exit interactive mode Type quit or press Ctrl+D

    Through the above steps, you can call this high-precision calculation tool at any time in the Linux terminal of your Chromebook.



    Install Emacs on Chromebook

    Enable Linux (Beta) features

    Before you can install Emacs on your Chromebook, you first need to enable the Linux (Beta) feature. Linux (Beta) provides an environment for running Linux applications on Chromebooks.

    1. Open your Chromebooksettings
    2. Scroll down and findLinux (Beta)
    3. Clickenablebutton and follow the prompts to complete the installation.

    Update Linux packages

    After installing the Linux environment, it is recommended to update the system software package first to ensure that Emacs can be installed smoothly.

    sudo apt update && sudo apt upgrade

    Enter the above command in the terminal and pressEnterkey.

    Install Emacs

    After completing the system update, you can install Emacs. Please enter the following command and pressEnter

    sudo apt install emacs

    Emacs will be downloaded and installed automatically. After the installation is complete, you can enter in the terminalemacsto start Emacs.

    Install Snap (optional)

    If you want to get a newer version of Emacs, you can install it using the Snap package manager. First, you need to install Snap:

    sudo apt install snapd

    Next, use Snap to install Emacs:

    sudo snap install emacs --classic

    This will install the latest version of Emacs.

    Start Emacs

    After the installation is complete, you can start Emacs by following these steps:

    FAQ

    If you encounter any errors during the installation process, it is recommended to check whether the network connection is stable and ensure that the Linux (Beta) feature is enabled and the system is updated.



    Chromebook opens .ods files

    1. Use Google Sheets

    Chromebooks come pre-installed with Google Sheets and support opening .ods files.

    1. Upload the .ods file on Google Drive.
    2. Right-click the file and select "Open with Google Spreadsheet."
    3. .ods files can be edited directly or saved as .xlsx or Google Sheets format.

    2. Using LibreOffice (Linux environment)

    Install LibreOffice through the Chromebook's Linux development environment to open .ods files.

    1. Enable Linux (Settings > Advanced > Developer > Linux Development Environment).
    2. In the Linux terminal enter:
      sudo apt update
      sudo apt install -y libreoffice
    3. After the installation is complete, open LibreOffice Calc and open the .ods file.

    3. Use online tools

    There is no need to install software, you can use online tools to open .ods files.

    4. Use Android Apps

    Some Chromebooks support Android applications and can install OpenOffice related apps.

    1. Install the app on Google Play Store.
    2. Open the app and select the .ods file to edit.

    in conclusion



    flat

    Common tablet gestures



    Chromebook using VS Code

    Environment overview

    Through the built-in Linux container (Crostini), Chromebook can create a development environment similar to Debian and install a variety of development tools such as VS Code, Python, Node.js, etc. If the hardware specifications are sufficient, it can carry out general Web, Python, C/C++ and other development work.

    Common development methods

    Enable Linux containers

    Enter Chromebook Settings → "Developer" → "Enable Linux Development Environment (Beta)" → Terminal will appear after completion. Execute in terminal:
    sudo apt update && sudo apt upgrade -y

    Install VS Code

    Download the official package and install:
    wget -O vscode.deb https://update.code.visualstudio.com/latest/linux-deb-x64/stable
    sudo apt install ./vscode.deb
    code
    

    Dependency error during installation

    If errors such as "libc6:amd64 not installable" occur, the usual reasons are as follows:

    Check schema

    Enter in the terminal:
    uname -m
    Description of results:

    ARM architecture solution

    If aarch64 is displayed, the official VS Code x64 installation package cannot be used. Use one of the following methods instead:Option 1: Official ARM64 version compressed file
    cd ~
    wget https://update.code.visualstudio.com/latest/linux-arm64/stable -O vscode-arm64.tar.gz
    tar -xzf vscode-arm64.tar.gz
    cd VSCode-linux-arm64
    ./code
    
    Option 2: VSCodium (open source version)
    sudo apt install -y curl gpg
    curl -fsSL https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
     | sudo gpg --dearmor -o /usr/share/keyrings/vscodium-archive-keyring.gpg
    echo 'deb [signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg] \
    https://download.vscodium.com/debs vscodium main' \
     | sudo tee /etc/apt/sources.list.d/vscodium.list
    sudo apt update
    sudo apt install codium
    codium
    
    Option 3: Use VS Code Web Edition
    Go directly tohttps://vscode.devUse, no installation required.

    Recommended choice

    Usage contextSuggestions
    Hope offline development, complete functionsDownload the official ARM64 compressed version
    Want to use package management and automatic updatesInstall VSCodium (codium)
    Occasional development, quick startUse vscode.dev

    in conclusion

    Chromebooks' Linux containers already meet most development needs. If it is x86_64 architecture, you can install the official VS Code directly; If it is ARM (aarch64), it is recommended to use VSCodium or the official ARM64 version compressed file. This makes it easy to create a complete program development environment on your Chromebook.

    basic tools

    UltraEdit

    UltraEdit is a powerful text editor designed for developers and editing professionals. Developed by IDM Computer Solutions, Inc., it supports multiple programming languages ​​and file formats and provides a variety of advanced features to increase productivity.

    Main features

    Basic operations

    Here are some basic UltraEdit operations:

    in conclusion

    UltraEdit is a powerful and flexible text editor suitable for a variety of uses, especially in programming and file management. Its multi-language support and advanced features make it an ideal choice for developers.



    Emacs

    Emacs is a highly extensible text editor originally developed by Richard Stallman in the 1970s. It is an open source software and supports a variety of programming languages ​​and markup languages, making it a popular choice among programmers and technical writers.

    Main features

    Basic operations

    Here are some basic Emacs operations:

    in conclusion

    Emacs is a powerful and flexible text editor suitable for a variety of purposes, whether programming or document editing. It may have a somewhat steep learning curve, but once mastered, it will greatly increase your productivity.



    Alternatives to MS Office

    1. Google Workspace

    The tools provided by Google Workspace include Google Docs (documents), Google Sheets (sheets), Google Slides (presentations), etc., with cloud storage and collaboration functions, allowing multiple users to edit and comment on files at the same time.

    2. LibreOffice

    LibreOffice is a free and open source office suite that includes Writer (word processing), Calc (spreadsheet), Impress (presentation), etc. It supports a variety of file formats and has a user interface similar to MS Office.

    3. WPS Office

    WPS Office is an office suite developed by Kingsoft Software. It includes text, form and presentation functions. The free version provides basic functions and supports interoperability with MS Office file formats.

    4. OnlyOffice

    OnlyOffice is an integrated office suite that supports editing of documents, spreadsheets and presentations, provides collaboration features, and can be integrated with cloud storage services such as Nextcloud.

    5. Zoho Office Suite

    Zoho Office Suite provides comprehensive applications including Zoho Writer, Zoho Sheet and Zoho Show, and supports seamless integration with other Zoho products, making it suitable for business use.

    6. Etherpad

    Etherpad is an open source real-time collaborative text editor, suitable for teams to edit documents at the same time, especially suitable for brainstorming or meeting notes.

    7. Markdown editor

    Markdown editors such as Typora and Obsidian focus on concise text editing and are especially suitable for users who need to quickly edit and format text.

    8. Prezi

    Prezi is a cloud-based briefing tool that provides dynamic and interactive briefing formats, suitable for users who need innovative presentation methods.

    in conclusion

    When choosing an alternative to MS Office, you should consider your own needs and usage scenarios. The above tools each have their own characteristics and suit the needs of different users. Whether used by individuals or teams, you can find suitable office tools.



    LibreOffice Writer saves PDF files

    Use the export function

    1. Open the file you want to export.
    2. Click on the menu abovefile
    3. chooseExport as > Export to PDF
    4. In the "PDF Options" window that opens, you can adjust settings according to your needs, such as compression, tags, password protection, etc.
    5. After setting is complete, pressremitbutton.
    6. Select the storage location and name the file, clickstorePDF will be generated.

    Quick toolbar export

    You can also directly click on the toolbarExport to PDFicon (the icon is a small PDF image), quickly generate PDF files, using default settings.

    Things to note



    Presentation software

    Common free presentation software

    Common paid presentation software

    Online presentation tool

    Select suggestions



    LibreOffice Calc calculates the hour difference between two times

    Method 1: Use formula

    Assume the starting time is in the cellA1, the end time is in the cellB1

    1. Enter the following formula in the target cell:
      =B1 - A1
    2. Set the result cell format to "Time Format" or "Number Format".

    If you need to display it in hours, use the formula:

    = (B1 - A1) * 24

    Method 2: Use the TEXT function

    If more precise or specific formatting is required, useTEXTfunction:

    =TEXT(B1 - A1, "[HH]")

    This will show the pure hour difference between the two.

    Things to note



    Calc gets the last value of a column

    Use formula method

    Suppose you want to get a worksheet in any cellColumn AFor the last non-null value, use the following formula:

    =INDEX(A:A;MAX(IF(A:A<>"";ROW(A:A))))

    Usage steps

    1. Select the cells where you want the results to appear.
    2. After entering the formula above, pressCtrl + Shift + Enter(Create array formula).
    3. The result is the content of the last non-blank cell in column A.

    To specify a worksheet

    To copy data from another worksheet such asSheet2) to get the last value in column A, available:

    =INDEX(Sheet2.A:A;MAX(IF(Sheet2.A:A<>"";ROW(Sheet2.A:A))))

    Simplified version (newer versions of LibreOffice only)

    If the version supportsFILTERFunction, also available:

    =INDEX(FILTER(A:A;A:A<>"");COUNTA(FILTER(A:A;A:A<>"")))

    Formula description



    If there are gaps in the column, take the last value of the column.

    Problem description

    you mentionedMAX(IF(A:A<>"";ROW(A:A)))"Incorrect" when there are interspersed spaces in the column. In practice, this type of array formula will have boundary problems for full column references or different data types (text/number mixed). Listed below are several robust practices (including applicable situations and explanations) that you can choose based on the data type and Calc version.

    Universal and concise (supports text and numbers, no array input required)

    =LOOKUP(2;1/(A1:A10000<>"" ); A1:A10000)

    Only numbers (quickly get the last value)

    =LOOKUP(9.99999999999999E+307; A1:A10000)

    If you want to get the last non-empty column number (and accept array formulas)

    =MAX(IF(A1:A10000<>""; ROW(A1:A10000) ))

    Replacement: Find the last column number first, then INDEX (more intuitive)

    =INDEX(A1:A10000; MATCH(2; 1/(A1:A10000<>"") ))

    Example (getting values ​​across worksheets)

    =LOOKUP(2;1/(Sheet2.A1:A10000<>"" ); Sheet2.A1:A10000)

    BundleSheet2Change the range to your actual worksheet with a reasonable upper limit.

    Practical suggestions



    LibreOffice Calc move bar and keep reference

    Use drag and drop (suitable for simple data)

    1. Select column G:
      • Click the field heading "G" to select the entire field.
    2. Drag to new location:
      • Press and holdAltkey (keep formula reference).
      • Drag column G between columns B and C. (Click on the column value to drag, not on the column title)
      • Release the mouse button when the vertical line appears.

    ✅ References will be updated automatically.

    Use cut and insert (for complex formulas)

    1. Select column G:
      • Click the field heading "G" to select the entire field.
    2. Cut fields:
      • according toCtrl + X(Windows/Linux) orCmd + X(Mac)。
    3. Insert cut fields:
      • Right-click on column C and select "Insert Cut Cells".

    ✅ Formula references will automatically remain correct.

    Using copy and paste (for manually adjusting references)

    1. Select column G and pressCtrl + C(Windows/Linux) orCmd + C(Mac)。
    2. Select column C and pressCtrl + V(Windows/Linux) orCmd + V(Mac)。
    3. If the reference is not updated automatically, use Find and Replace:
      • according toCtrl + HTurn on find and replace.
      • looking for$G, replaced by$C
      • Click "Replace All".

    in conclusion



    Calc title bar hides sort drop-down button

    Reason for occurrence

    In LibreOffice Calc, if the "AutoFilter" or "Filter" function is enabled, a drop-down arrow will appear next to each field name in the title bar, which can be used to sort or filter.

    How to cancel drop-down button

    1. Select the title bar range with the drop-down arrow.
    2. Click on the menu abovematerial
    3. chooseAutomatic filtering(AutoFilter)。
    4. After clicking again, the drop-down arrow will be closed.

    Other related operations

    Things to note



    Calc sets cell color based on formula

    Use conditional formatting to set colors

    In LibreOffice Calc, you can use "conditional formatting" to set the color of cells based on formulas.

    step

    1. Select the range of cells to which you want to apply the color.
    2. ClickFormat > conditional formatting > condition...
    3. Select "Formula is" under "Condition 1".
    4. Enter the formula, for example:
      • A1>100(Changes color when A1 is greater than 100)
      • MOD(ROW();2)=0(Colorize even columns)
    5. Click "Add Style", select a background color and name the style.
    6. Click OK to apply the settings.

    Common formula examples

    Things to note



    Calc dynamic column reference

    Determine column number based on cell contents

    In Calc, likeA$534This way of writing fixes column 534A534Cell.
    If you want the column number "534" to be determined by the value of other cells (for example, the cellB1content is 534), you can useINDIRECT (indirect reference)function.

    example

    =INDIRECT("A"&B1)

    Cross-sheet example

    =INDIRECT("'Sheet2'.A"&B1)

    The matching column number is also dynamic

    If both columns and columns are to be specified by cells, for example:

    Available:

    =INDIRECT(B1 & B2)

    The result is equivalent to=C55

    Another way to write the ADDRESS function

    If you want to generate the complete address numerically, you can also use:

    =INDIRECT(ADDRESS(B2; COLUMN(A1)))

    Things to note



    OpenOffice Calc and HTML table editing

    OpenOffice Calc export to HTML table

    OpenOffice Calc (spreadsheet program) is not primarily an HTML table editor, but it has the ability to export (or save) spreadsheet content to HTML format, which can generate an HTML table.

    Calc as an HTML table creation tool

    Calc’s excellent spreadsheet function makes it a convenient tool for creating HTML table data and structures:

    1. Create and organize tabular data in Calc using the familiar cell interface.
    2. Design with Calc's features such as merged cells, fonts, and background colors.
    3. Save or export the completed spreadsheet as an HTML file.
    4. You will then need to use a specialized HTML editor or text editor to copy and paste the $\lt$table$\gt$ code output by Calc into your web page project.

    Editing HTML tables: Reverse operation (import)

    Calc also supports importing existing HTML tables into spreadsheets:

    Summarize

    OpenOffice Calc is not a WYSIWYG HTML editor. It cannot visually edit HTML code directly like professional web editing software. But it can:



    HTML table editor

    What is HTML table editor?

    The HTML table editor is a tool that allows users to easily create, modify and manage HTML tables through a graphical interface or concise syntax. Users usually do not need to write complex $\lt$table$\gt$, $\lt$tr$\gt$, $\lt$td$\gt$ or $\lt$th$\gt$ tags directly. Instead, they can complete table design and data filling by clicking, dragging or typing content.

    Editor type

    Main functions

    Function describe
    Add/delete rows and columns Quickly add or remove rows or columns anywhere in the table.
    Merge cells Supports the $\text{colspan}$ (spanning columns) and $\text{rowspan}$ (spanning rows) attributes of the $\lt$td$\gt$ or $\lt$th$\gt$ tags.
    Style adjustment Set the border, background color, text alignment, etc. of the table, row, or cell with $\text{CSS}$ styles.
    Content editing Type or paste text, images, or other HTML content directly into the cell.
    Code preview/output Instantly displays the generated HTML source code and provides copy or download capabilities.

    How to use (take WYSIWYG editor as an example)

    1. Create a table: Click the "Insert Table" button on the toolbar and set the initial number of rows and columns.
    2. Enter data: Click a cell in the table and enter the required content.
    3. Modify the structure: Right-click a cell and use the options in the menu to add, delete, or merge cells.
    4. Adjust styles: Select the entire table or specific cells and use the Properties panel to adjust styles such as width, color, and borders.


    HTML table WYSIWYG editor

    Common WYSIWYG editor types

    What you see is what you get (WYSIWYG) editor allows users to operate in a visual interface without writing HTML code directly. In terms of "table editing", they usually provide intuitive buttons and menus to insert, modify and merge tables. This type of editor is mainly divided into several forms:

    Independent web design software

    This type of software is a complete desktop application designed to create and manage an entire website. It contains a powerful WYSIWYG editor function, table editing is just one of its many functions.

    As part of a content management system (CMS)

    Many content management systems (such as WordPress, Joomla!, Drupal, etc.) and e-commerce platforms have built-in WYSIWYG editors in the article or page editing interface. Users can insert and modify tables directly in the background editor.

    Online HTML Generator/Tool

    These are tools that run specifically on web pages, and their main purpose is to quickly generate HTML code, including table code. Users set parameters (such as the number of rows, columns, styles) on the web interface, and the tool will instantly generate code for users to copy.

    Other application built-in editors

    Some desktop applications, such as specific note-taking software or productivity tools, usually have built-in WYSIWYG editing capabilities for processing tables if they support exporting HTML format.



    virtual machine software

    What is a virtual machine?

    Virtual machine is a software technology that can simulate a complete computer system, allowing users to run multiple virtual operating systems on a physical computer. Through virtual machines, you can run different versions of operating systems, such as Windows, Linux, etc., simultaneously on the same hardware.

    Advantages of virtual machines

    Common virtual machine software

    Virtual machine applications

    Virtual machines are widely used in development, testing, server virtualization, and desktop virtualization. It can help developers conduct software testing in multiple operating system environments, and also provide enterprises with a more flexible server management method.



    How to make a system boot disk

    What is a boot disk?

    A bootable disk is a storage device from which a computer can be booted. It is often used to install operating systems or repair system problems. Common media are USB flash drives or external hard drives.

    Preparation

    Common production tools

    on Windows

    on Linux

    How to use Ventoy

    1. Download and execute Ventoy
    2. Select the USB device and click "Install"
    3. After the installation is complete, the USB device will be in a special format
    4. Copy multiple ISO files directly to USB (no need to repeat formatting)
    5. Restart and boot from USB, Ventoy will display the ISO menu

    Rufus production steps

    1. Turn on Rufus and plug in the USB
    2. Select ISO file
    3. Select boot mode (MBR/GPT)
    4. Click "Start" and wait for completion

    Linux dd command demonstration

    sudo dd if=~/Downloads/os.iso of=/dev/sdX bs=4M status=progress && sync

    After completion

    Suggestions and Notes



    Software mall

    Software sales platform

    In 2026, choosing the right software sales platform will depend on your software type and target market. The following are the classifications and characteristics of mainstream platforms:


    Universal digital products and SaaS platforms

    Game and desktop application distribution platform

    Enterprise and mobile application mall

    Taiwanese local e-commerce platform


    Platform selection comparison table

    demand target Recommended platform Core advantages
    Automate global tax processing Paddle / Lemon Squeezy Save yourself the trouble of tax declaration in various countries
    Pursue maximum traffic Steam / App Store Ready-made massive user base
    Quickly build a brand official website Shopify / SHOPLINE Highly customized shopping experience
    Early seed user acquisition AppSumo Get cash quickly through promotions


    T:0000