← 返回命令列表

Linux command

gedit 命令

文件

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

常用示例

Open

gedit [path/to/file]

Example

gedit [file1] [file2] ...

Example

gedit --encoding UTF-8 [path/to/file]

Example

gedit --list-encodings

说明

gedit is the default text editor for the GNOME desktop environment. It provides a clean, simple interface for editing text files with features like syntax highlighting for programming languages, spell checking, search and replace, and plugin support. gedit supports tabbed editing for multiple files, automatic file backup, configurable fonts and colors, and integration with GNOME's file manager. It can handle various character encodings and line ending formats. Plugins extend functionality with features like code snippets, bracket matching, file browser panel, and external tool integration.

参数

--encoding _ENCODING_
Set the character encoding for opening files
--list-encodings
Display list of supported character encodings
-s, --standalone
Run gedit in standalone mode (separate process)
-w, --wait
Open files and wait until closed before returning
--new-window
Create a new top-level window
--new-document
Create a new document in an existing instance
+LINE
Open file at specified line number
+LINE:COLUMN
Open file at specified line and column

FAQ

What is the gedit command used for?

gedit is the default text editor for the GNOME desktop environment. It provides a clean, simple interface for editing text files with features like syntax highlighting for programming languages, spell checking, search and replace, and plugin support. gedit supports tabbed editing for multiple files, automatic file backup, configurable fonts and colors, and integration with GNOME's file manager. It can handle various character encodings and line ending formats. Plugins extend functionality with features like code snippets, bracket matching, file browser panel, and external tool integration.

How do I run a basic gedit example?

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

What does --encoding _ENCODING_ do in gedit?

Set the character encoding for opening files