Aptivi - Deprecated Manuals
ProjectsWebsiteBlog
Nitrocid KS v0.1.1 - Service Pack 1
Nitrocid KS v0.1.1 - Service Pack 1
  • 👋Welcome!
  • 🗞️Version Release Notes
  • Installation and Maintenance
    • 📀Installing the Kernel
      • 💻Windows
      • 🍎macOS
      • 🐧Linux
      • 📱Android
    • ⏫Upgrading the Kernel
      • 💻Windows
      • 🍎macOS
      • 🐧Linux
      • 📱Android
    • 📦Dependency Information
  • Fundamentals
    • 🌽What is the Kernel?
    • 👾What is Nitrocid KS?
    • ⭐Simulated Kernel Features
      • 🌟Extra Features
        • 🌏More Networking
          • 🗃️FTP Client
          • 🔒SFTP Client
          • 📰RSS Client
          • 🌐HTTP Client
          • 📧Mail Client
        • 🎮Games and Amusements
          • 🔤Hangman
          • 🏇BackRace
          • ☄️Meteor
          • 🏓Pong
          • 🎰Russian Roulette
          • ☄️ShipDuet
          • 🐍Snaker
          • 🔢Solver
          • ⌨️SpeedPress
          • 🔠Wordle
        • 🖊️More Editors
          • 🖊️JSON Editor
          • 🗄️SQL Editor
        • 🧰Common Programs
          • 📦Archive
          • ☕Caffeine
          • 🗓️Calendar
          • 🔢Calculator
          • 👥Contacts
          • 📕Dictionary
          • 👩‍💻Git Shell
          • 🎧Music Player
          • 🗒️Notes
          • 🔌SSH Connection
          • 💹Stocks
          • ⏰Stopwatch and Timer
          • ☑️To-do List
          • ⚖️Unit Converter
          • ☀️Weather
        • 🖼️Docking
        • 🌏Language Studio
        • 🎨Theme Studio
      • 👤Accounts
        • 👥Groups
        • 🔓Permissions
      • ✏️Editors
        • 📝Text Editor
        • 💾Hex Editor
      • 🐚Shells
        • 📄Commands List
        • 📄Addon Commands List
      • 📂Files and Folders
        • 🔐Hashing and Encryption
      • 🏠The Nitrocid Homepage
      • 🌎Networking
      • 🇺🇸Languages
      • 🌌Screensavers
      • 📅Lockscreen Widgets
  • Advanced and Power Users
    • ⚒️Building the Kernel
      • 🪟Building on Windows
      • 🍎Building on macOS
      • 🐧Building on Linux
      • 📱Building on Android
    • 🧰Kernel Modifications
      • 🧪Building your Mod
      • 📈Analyzing your Mod
        • 📉Text - NKS0001
        • 📉ConsoleBase - NKS0002
        • 📉ConsoleBase - NKS0003
        • 📉ConsoleBase - NKS0004
        • 📉ConsoleBase - NKS0005
        • 📉ConsoleBase - NKS0006
        • 📉ConsoleBase - NKS0007
        • 📉ConsoleBase - NKS0008
        • 📉ConsoleBase - NKS0009
        • 📉Files - NKS0010
        • 📉Files - NKS0011
        • 📉Files - NKS0012
        • 📉Files - NKS0013
        • 📉Files - NKS0014
        • 📉Files - NKS0015
        • 📉Files - NKS0016
        • 📉Files - NKS0017
        • 📉Files - NKS0018
        • 📉Files - NKS0019
        • 📉Files - NKS0020
        • 📉Files - NKS0021
        • 📉Files - NKS0022
        • 📉Files - NKS0023
        • 📉Kernel - NKS0024
        • 📉Kernel - NKS0025
        • 📉Kernel - NKS0026
        • 📉Kernel - NKS0027
        • 📉Kernel - NKS0031
        • 📉Kernel - NKS0032
        • 📉Kernel - NKS0033
        • 📉Kernel - NKS0037
        • 📉Kernel - NKS0038
        • 📉Kernel - NKS0039
        • 📉Kernel - NKS0040
        • 📉Kernel - NKS0041
        • 📉Kernel - NKS0042
        • 📉Kernel - NKS0043
        • 📉Kernel - NKS0052
        • 📉Kernel - NKS0053
        • 📉Languages - NKS0044
        • 📉Languages - NKS0045
        • 📉Languages - NKS0046
        • 📉Network - NKS0051
        • 📉Text - NKS0047
        • 📉Text - NKS0048
        • 📉Text - NKS0049
        • 📉Text - NKS0050
        • 📉Text - NKS0054
        • 📉Text - NKS0055
      • 🔧Managing your Mod
        • 📞Inter-Mod Communication
        • 📞Inter-Addon Communication
    • 🦠Diagnostics
      • 🔬Debugging
        • 🧬Local Debugging
        • 🛰️Remote Debugging
      • 🧪Testing
      • 💉Other Diagnostics
    • 📀Bootloader
      • 👆Boot Choices
      • ▶️Kernel Environments
      • 💄Custom Boot Styles
    • ⚒️Inner Workings
      • 🔧Kernel Settings
        • ⛏️Mechanics of Settings App
        • 🔩Settings Format
        • ⚙️Custom Settings
      • 🐚Shell Structure
        • ❔Help System
        • 🗜️Command Parsing
        • 🔋Command Information
        • ⏲️Command Switch Management
        • 🎚️Command Switch Information
        • ⏳Shell History
        • 📜Shell Scripting
        • 📟Shell Presets
        • 💠Extra Shell Features
      • 🌍Multilingual Kernel
        • 🌐Custom Languages
      • ♦️Inner Essentials
        • 🔌Kernel Drivers
          • 🔌Console Drivers
          • 🔌Debug Logger Drivers
          • 🔌Encoding Drivers
          • 🔌Encryption Drivers
          • 🔌Filesystem Drivers
          • 🔌Hardware Prober Drivers
          • 🔌Input Drivers
          • 🔌Network Drivers
          • 🔌RNG Drivers
          • 🔌Regular Expression Drivers
          • 🔌Sorting Drivers
        • 🪧Kernel Placeholders
        • 🔐The Permissions
        • 👥The Users
        • 📞Kernel Threads
        • 🎛️Kernel Arguments
        • 📒Kernel Journaling
        • 📡Remote Procedure
        • 🗃️Nitrocid Filesystem
        • 🌃Screensaver Internals
        • 💦Splash Internals
        • 🖥️Kernel Platform
        • 🎨Theme Internals
        • ⛱️Color Internals
        • 🔏Privacy Consents
        • 🔔System Notifications
        • ✉️MAL and MOTD
        • ⌛Progress Handlers
        • ✒️Assembly Signing
        • 🔐Assembly Reflection
        • 🎰Random Number Generation
        • 🌍Network Tools
        • 🕙Date and Time
        • 📖Mod Manual Pages
      • 🌀Miscellaneous APIs
  • 🧱Project Dependencies
  • Report an issue
  • Source code
  • API Reference
Powered by GitBook
On this page
  • Operating systems
  • Terminals
  • Environments
  • CoreCLR
Edit on GitHub
  1. Advanced and Power Users
  2. Inner Workings
  3. Inner Essentials

Kernel Platform

Sometimes we need to check your platform.

Last updated 3 months ago

Sometimes, your mod may contain code that only works on certain platforms. For example, your mod may intentionally call an external unmanaged library's function to do something not normally done in the .NET world using P/Invokes. However, native libraries need to be compiled for the target machines.

Or, you may want to change the behavior of your mod by platform or by how the kernel is started, such as if the kernel was started by the GRILO bootloader.

KernelPlatform provides functions to detect platforms and environments. This is to make such tasks relatively easy.

Currently, KernelPlatform doesn't support checking for architectures, like IsAmd64().

You can check your kernel version and your host RID by going to settings > System information.

Operating systems

This class provides the following OS-related functions:

  • IsOnWindows(): Checks to see if Nitrocid KS is running on Windows.

  • IsOnUnix(): Checks to see if Nitrocid KS is running on Unix and its derivatives, such as Linux, macOS, etc.

  • IsOnMacOS(): Checks to see if Nitrocid KS is running on Darwin Kernel, the kernel behind macOS.

  • IsOnAndroid(): Checks to see if Nitrocid KS is running on Android phones and tablets within Termux.

  • IsOnUnixMusl(): Checks to see if the kernel is running on musl libc library or glibc.

Terminals

This class provides the following terminal-related functions:

  • GetTerminalEmulator(): Gets the terminal emulator name. This may not be accurate.

  • GetTerminalType(): Gets the terminal type name, such as xterm. This may not be accurate.

There are some terminal emulators advertising themselves as XTerm compliant, but actually aren't fully compliant. We advice that you introduce extra checks to ensure that your terminal emulator fully supports the features that you want to use, especially when it comes with the VT sequences.

Environments

This class provides the following environment-related functions:

  • IsRunningFromGrilo(): Checks to see whether Nitrocid KS is run from GRILO

  • IsRunningFromTmux(): Checks to see whether Nitrocid KS is run on TMUX

  • IsRunningFromScreen(): Checks to see whether Nitrocid KS is run on GNU Screen

CoreCLR

This class provides the following CoreCLR-related functions:

  • GetCurrentRid(): Gets the current runtime identifier.

  • GetCurrentGenericRid(): Gets the current non-distro-specific runtime identifier.

If you're running on a MUSL-based Linux system, GetCurrentGenericRid() returns a MUSL-based generic runtime identifier, such as linux-musl-arm64.

⚒️
♦️
🖥️