打开gedit,右边行列那,点开,勾选【显示行号】 但只是临时
永久设置行号显示
gsettings set org.gnome.gedit.preferences.editor display-line-numbers true
关闭行号显示
gsettings set org.gnome.gedit.preferences.editor display-line-numbers false
报错解决
GLib-GIO-Message: 01:22:43.344: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
设置环境变量
sudo gedit ~/.bashrc
添加变量
# for GIO
export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules/
保存环境变量
source ~/.bashrc