← 返回命令列表

Linux command

mono 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Run

mono [path/to/program.exe]

Example

mono --debug [path/to/program.exe]

Example

mono --runtime=v4.0 [path/to/program.exe]

Trace method calls

mono --trace [path/to/program.exe]

Example

mono --interpreter [path/to/program.exe]

Pre-compile

mono --aot [path/to/assembly.dll]

说明

Mono is an open-source implementation of the ECMA Common Language Infrastructure (CLI) that executes .NET applications on Linux, macOS, and other platforms. It provides a runtime environment for C#, VB.NET, and other .NET languages. The runtime loads assembly files (.exe or .dll) and compiles Common Intermediate Language (CIL) bytecode to native machine code using Just-in-Time (JIT) compilation. Ahead-of-Time (AOT) compilation is also supported for improved startup performance.

参数

--debug=_options_
Enable debugging mode; options include casts, mdb-optimizations, gdb
--aot=_options_
Pre-compile CIL to native code; options: llvm, full, static, asmonly
--full-aot
Run exclusively on pre-generated AOT code without runtime JIT
--interpreter
Use interpreter instead of JIT compilation
--llvm
Use LLVM backend for code generation when available
--gc=_engine_
Select garbage collector: boehm or sgen
-O=_mode_
Enable/disable optimizations (inline, sse2, tailc, abcrem, etc.)
--trace=_expression_
Trace method invocations with optional filtering
--config _filename_
Load custom configuration file
--runtime=_version_
Override runtime version selection (e.g., v4.0)
--debugger-agent=_options_
Configure remote debugging capabilities
--profile=_profiler_
Enable profiling with specified profiler

FAQ

What is the mono command used for?

Mono is an open-source implementation of the ECMA Common Language Infrastructure (CLI) that executes .NET applications on Linux, macOS, and other platforms. It provides a runtime environment for C#, VB.NET, and other .NET languages. The runtime loads assembly files (.exe or .dll) and compiles Common Intermediate Language (CIL) bytecode to native machine code using Just-in-Time (JIT) compilation. Ahead-of-Time (AOT) compilation is also supported for improved startup performance.

How do I run a basic mono example?

Run `mono [path/to/program.exe]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --debug=_options_ do in mono?

Enable debugging mode; options include casts, mdb-optimizations, gdb