from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites: www.linuxhowtos.org
toolsntoys.linuxhowtos.org



Last additions:
How to make X listen on port 6000

How to make X listen on port 6000

words:

34

views:

86764

userrating:

average rating: 1.2 (52 votes) (1=very good 6=terrible)


May, 25th 2007:
April, 26th 2007:
Apr, 10th. 2007:
Druckversion . pdf icon
You are here: Tutorials per portage category->app-editors->nano

Configuring the nano text editor


nano is a small, free and friendly editor which aims to replace Pico, the default editor included in the non-free Pine package. Rather than just copying Pico's look and feel, nano also implements some missing (or disabled by default) features in Pico, such as "search and replace" and "goto line number".

Lets go ahead and configure it.

($:~)=> nano -w ~/.nanorc
# Use auto-indentation  
set autoindent

# Backup files to filename~
set backup

# Use cut to end of line with ^K by default
set cut

# Enable ~/.nano_history for saving and reading search/replace strings.
# set historylog

# Don't convert files from DOS/Mac format
set noconvert

# Don't follow symlinks when writing files
# set nofollow

# Don't display the help lists at the bottom of the screen
# set nohelp

# Don't wrap text at all
set nowrap

# Use smooth scrolling as the default
set smooth

# Use this spelling checker instead of the internal one. This option
# does not properly have a default value.
set speller "aspell -c"

# Allow nano to be suspended with ^Z
# set suspend

# Use this tab size instead of the default; it must be greater than 0
# set tabsize 8

# Save automatically on exit, don't prompt
# set tempfile

# Enable ~/.nano_history for saving and reading search/replace strings.
# set historylog

# Disallow file modification, why would you want this in an rc file? ;)
# set view

#Color Syntax Highlighting
syntax "c-file" "\.(c|h)$"
color red "\<[A-Z_]{2,}\>"
color green "\<(float|char|int|void|static|const|struct)\>"
color brightyellow "\<(if|while|do|else|case|switch)\>"
color brightcyan "^#( )*(define|include|ifn?def|endif|elif|else|if)"
color brightyellow "<[^= ]*>" ""(.|[^"])*""
color brightyellow start=""(\\.|[^\"])*\\( | )*$" end="^(\\.|[^\"])*""
color brightblue "//.*"
color brightblue start="/\*" end="\*/"

syntax "HTML" "\.html$"
color blue start="<" end=">"
color red "&[^; ]*;"

syntax "TeX" "\.tex$"
color green "\\.|\\[A-Za-z]*"
color magenta "[{}]"
color blue "%.*"

syntax "mutt"
color green "^>.*"

syntax "php" ".*/*.php$"
color brightwhite "\{|\}|\."
color red "('[^']*')"
color red "\"[^\"]*\""
color brightblue "(\$([[:alpha:]_]|->)*)"
color brightgreen "((\$(([[:alpha:]_0-9])+\->)+)[[:alpha:]_0-9]+\()"
color yellow " (if|else if|else|return|case|break)"
color yellow "\|\||\?|!|\||&&|=|;|\(|\)"
color red "false|true"
color brightwhite "[[:space:]]+debug|[[:space:]]+echo|\$this\->debug"
color cyan "//.*"
color cyan start="/\*" end="\*/"

syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
color cyan "^\.ds [^ ]*"
color cyan "^\.nr [^ ]*"
color brightmagenta "\\."
color brightmagenta "\\f."
color brightmagenta "\\f\(.."
color brightmagenta "\\s(\+|\-)?[0-9]"
color cyan "(\\|\\\\)n."
color cyan "(\\|\\\\)n\(.."
color cyan start="(\\|\\\\)n\[" end="]"
color brightgreen "^\. *[^ ]*"
color yellow "^\.\\\".*$"
color green "(\\|\\\\)\*."
color green "(\\|\\\\)\*\(.."
color green start="(\\|\\\\)\*\[" end="]"
color brightred "\\\(.."
color brightred start="\\\[" end="]"
color brightcyan "\\\\\$[1-9]"

syntax "perl" "\.p[lm]$"
color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o
|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork)|get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid
|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|
int|ioctl|join|keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop
|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek|seekdir|se(lect|mctl|mget|
mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|st
udy|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr|y|truncate|umask|un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
color cyan start="[$@%]" end="( |\\W|-)"
color yellow "".*"|qq\|.*\|"
color white "[sm]/.*/"
color white start="(^use| = new)" end=";"
color green "#.*"
color yellow start="<< 'STOP'" end="STOP"

syntax "Java source" "\.java$"
color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
color red ""[^"]*""
color yellow "<(true|false|null)>"
color blue "//.*"
color blue start="/\*" end="\*/"
color brightblue start="/\*\*" end="\*/"
color brightgreen,brightgreen "[ ]+$"

syntax "nanorc" "[\.]*nanorc$"
color white "^ *(set|unset).*$"
color cyan "^ *(set|unset) (autoindent|backup|const|cut|fill|keypad|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|quotestr|regexp|smooth|speller|suspend|tabsize|tempfile|historylog|view)"
color brightwhite "^ *syntax [^ ]*"
color brightblue "^ *set\>" "^ *unset\>" "^ *syntax\>"
color white "^ *color\>.*"
color yellow "^ *color (bright)?(white|black|red|blue|green|yellow|magenta|cyan)\>"
color magenta "^ *color\>"
color green "^#.*$"

syntax "bash" "\.sh$"
color brightblack "#.*"
color brightyellow "\(" "\)" "\{" "\}"
color red "\<[A-Z_]{2,}\>"
color red "[\$\*\'\`\|\=]"
color brightblue "\[.*\]"
color green "\<-e\>" "\<-d\>" "\<-f\>" "\<-r\>" "\<-g\>" "\<-u\>" "\<-u\>" "\<-w\>" "\<-x\>" "\<-L\>"
color green "\<-eq\>" "\<-ne\>" "\<-gt\>" "\<-lt\>" "\<-ge\>" "\<-le\>" "\<-s\>" "\<-n\>" "\<-z\>"
color blue "\" "\" "\" "\" "\" "\" "\" "\" "\"
color blue "\" "\" "\" "\" "\"
color brightwhite "\.*"


And thats it. You may want to read the /usr/share/doc/nano/nanorc.sample file for any other options you may want or change the color highlighting a bit.
rate this article:
current rating: average rating: 1.4 (58 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back



Support us on Content Nation

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2026-07-12
at-spi2-core - 2.58.7
Ebuild name:

app-accessibility/at-spi2-core-2.58.7

Description

D-Bus accessibility specifications and registration daemon

Added to portage

2026-07-12

at-spi2-core - 2.60.5
Ebuild name:

app-accessibility/at-spi2-core-2.60.5

Description

D-Bus accessibility specifications and registration daemon

Added to portage

2026-07-12

coredns - 1.14.6
Ebuild name:

net-dns/coredns-1.14.6

Description

CoreDNS is a DNS server that chains plugins

Added to portage

2026-07-12

eclipse-ecj - 4.40
Ebuild name:

dev-java/eclipse-ecj-4.40

Description

Eclipse Compiler for Java

Added to portage

2026-07-12

fonttools - 4.63.0-r1
Ebuild name:

dev-python/fonttools-4.63.0-r1

Description

Library for manipulating TrueType, OpenType, AFM and Type1 fonts

Added to portage

2026-07-12

meson - 1.11.2
Ebuild name:

dev-build/meson-1.11.2

Description

Open source build system

Added to portage

2026-07-12

meson - 1.12.0_rc1
Ebuild name:

dev-build/meson-1.12.0_rc1

Description

Open source build system

Added to portage

2026-07-12

modus-themes - 5.3.0
Ebuild name:

app-emacs/modus-themes-5.3.0

Description

Highly accessible themes for GNU Emacs

Added to portage

2026-07-12

networkmanager - 1.56.1
Ebuild name:

net-misc/networkmanager-1.56.1

Description

A set of co-operative tools that make networking simple and straight

Added to portage

2026-07-12

pkgconf - 3.0.0
Ebuild name:

dev-util/pkgconf-3.0.0

Description

pkg-config compatible replacement with no dependencies other than C99

Added to portage

2026-07-12

upower - 1.91.2
Ebuild name:

sys-power/upower-1.91.2

Description

D-Bus abstraction for enumerating power devices, querying history and stati

Added to portage

2026-07-12

upower - 1.91.3
Ebuild name:

sys-power/upower-1.91.3

Description

D-Bus abstraction for enumerating power devices, querying history and stati

Added to portage

2026-07-12

2026-07-11
apache-arrow - 25.0.0
Ebuild name:

dev-libs/apache-arrow-25.0.0

Description

A cross-language development platform for in-memory data

Added to portage

2026-07-11

apsw - 3.53.3.1
Ebuild name:

dev-python/apsw-3.53.3.1

Description

APSW - Another Python SQLite Wrapper

Added to portage

2026-07-11

awscli - 1.45.46
Ebuild name:

app-admin/awscli-1.45.46

Description

Universal Command Line Environment for AWS

Added to portage

2026-07-11

bitarray - 3.9.0
Ebuild name:

dev-python/bitarray-3.9.0

Description

Efficient arrays of booleans -- C extension

Added to portage

2026-07-11

bitcoin-core - 29.4
Ebuild name:

net-p2p/bitcoin-core-29.4

Description

Reference implementation of the Bitcoin cryptocurrency

Added to portage

2026-07-11

bitcoin-core - 30.3
Ebuild name:

net-p2p/bitcoin-core-30.3

Description

Reference implementation of the Bitcoin cryptocurrency

Added to portage

2026-07-11

bitcoin-core - 31.1
Ebuild name:

net-p2p/bitcoin-core-31.1

Description

Reference implementation of the Bitcoin cryptocurrency

Added to portage

2026-07-11

boto3 - 1.43.46
Ebuild name:

dev-python/boto3-1.43.46

Description

The AWS SDK for Python

Added to portage

2026-07-11

botocore - 1.43.46
Ebuild name:

dev-python/botocore-1.43.46

Description

Low-level, data-driven core of boto 3

Added to portage

2026-07-11

cliff - 4.15.0
Ebuild name:

dev-python/cliff-4.15.0

Description

Command Line Interface Formulation Framework

Added to portage

2026-07-11

conky - 1.24.2
Ebuild name:

app-admin/conky-1.24.2

Description

An advanced, highly configurable system monitor for X

Added to portage

2026-07-11

croniter - 6.2.4
Ebuild name:

dev-python/croniter-6.2.4

Description

Python module to provide iteration for datetime object

Added to portage

2026-07-11

discid - 1.4.2
Ebuild name:

dev-python/discid-1.4.2

Description

Python bindings for libdiscid

Added to portage

2026-07-11

fitsio - 1.4.1
Ebuild name:

dev-python/fitsio-1.4.1

Description

Python library to read from and write to FITS files

Added to portage

2026-07-11

ggml - 0.16.0
Ebuild name:

sci-ml/ggml-0.16.0

Description

Tensor library for machine learning

Added to portage

2026-07-11

gnome-control-center - 49.8
Ebuild name:

gnome-base/gnome-control-center-49.8

Description

GNOME's main interface to configure various aspects of the des

Added to portage

2026-07-11

gnome-session - 49.3
Ebuild name:

gnome-base/gnome-session-49.3

Description

Gnome session manager

Added to portage

2026-07-11

gnome-shell - 49.8
Ebuild name:

gnome-base/gnome-shell-49.8

Description

Provides core UI functions for the GNOME desktop

Added to portage

2026-07-11

gspell - 1.14.4
Ebuild name:

app-text/gspell-1.14.4

Description

Spell check library for GTK+ applications

Added to portage

2026-07-11

gssdp - 1.6.6
Ebuild name:

net-libs/gssdp-1.6.6

Description

GObject-based API for handling resource discovery and announcement over SSDP

Added to portage

2026-07-11

headscale - 0.29.2
Ebuild name:

net-vpn/headscale-0.29.2

Description

An open source, self-hosted implementation of the Tailscale control server

Added to portage

2026-07-11

hypothesis - 6.156.6
Ebuild name:

dev-python/hypothesis-6.156.6

Description

A library for property based testing

Added to portage

2026-07-11

jq - 1.12.0
Ebuild name:

dev-python/jq-1.12.0

Description

Python bindings for jq

Added to portage

2026-07-11

kpipewire - 6.6.6.1
Ebuild name:

kde-plasma/kpipewire-6.6.6.1

Description

Components relating to Flatpak pipewire use in Plasma

Added to portage

2026-07-11

libffi - 3.7.1
Ebuild name:

dev-libs/libffi-3.7.1

Description

Portable, high level programming interface to various calling conventions

Added to portage

2026-07-11

libpeas - 2.2.1
Ebuild name:

dev-libs/libpeas-2.2.1

Description

A GObject plugins library

Added to portage

2026-07-11

libxcrypt - 4.5.2
Ebuild name:

sys-libs/libxcrypt-4.5.2

Description

Extended crypt library for descrypt, md5crypt, bcrypt, and others

Added to portage

2026-07-11

libxfce4ui - 4.21.9
Ebuild name:

xfce-base/libxfce4ui-4.21.9

Description

Unified widget and session management libs for Xfce

Added to portage

2026-07-11

mac - 13.18
Ebuild name:

media-sound/mac-13.18

Description

Monkey's Audio Codecs

Added to portage

2026-07-11

memcached - 1.6.45
Ebuild name:

net-misc/memcached-1.6.45

Description

High-performance, distributed memory object caching system

Added to portage

2026-07-11

mm-common - 1.0.8
Ebuild name:

dev-cpp/mm-common-1.0.8

Description

Build infrastructure and utilities for GNOME C++ bindings

Added to portage

2026-07-11

modus-themes - 9999
Ebuild name:

app-emacs/modus-themes-9999

Description

Highly accessible themes for GNU Emacs

Added to portage

2026-07-11

mpg123-el - 1.65
Ebuild name:

app-emacs/mpg123-el-1.65

Description

Emacs front-end to mpg123 audio player and OggVorbis audio player

Added to portage

2026-07-11

mutter - 49.7
Ebuild name:

x11-wm/mutter-49.7

Description

GNOME compositing window manager based on Clutter

Added to portage

2026-07-11

neard - 0.20
Ebuild name:

net-wireless/neard-0.20

Description

Near Field Communication (NFC) management daemon

Added to portage

2026-07-11

ollama - 0.31.2
Ebuild name:

sci-ml/ollama-0.31.2

Description

Get up and running with Llama 3, Mistral, Gemma, and other language models.

Added to portage

2026-07-11

openvswitch - 3.3.9
Ebuild name:

net-misc/openvswitch-3.3.9

Description

Production quality, multilayer virtual switch

Added to portage

2026-07-11

openvswitch - 3.7.1
Ebuild name:

net-misc/openvswitch-3.7.1

Description

Production quality, multilayer virtual switch

Added to portage

2026-07-11

osc-lib - 4.7.0
Ebuild name:

dev-python/osc-lib-4.7.0

Description

A package of common support modules for writing OSC plugins

Added to portage

2026-07-11

oslo-context - 6.5.0
Ebuild name:

dev-python/oslo-context-6.5.0

Description

Helpers to maintain useful information about a request context

Added to portage

2026-07-11

oslo-i18n - 6.9.0
Ebuild name:

dev-python/oslo-i18n-6.9.0

Description

Oslo i18n library

Added to portage

2026-07-11

oslo-log - 8.3.0
Ebuild name:

dev-python/oslo-log-8.3.0

Description

OpenStack logging config library, configuration for all openstack project

Added to portage

2026-07-11

oslo-serialization - 5.11.0
Ebuild name:

dev-python/oslo-serialization-5.11.0

Description

Oslo Serialization library

Added to portage

2026-07-11

ovs - 3.3.9
Ebuild name:

dev-python/ovs-3.3.9

Description

OVS bindings for python

Added to portage

2026-07-11

ovs - 3.7.1
Ebuild name:

dev-python/ovs-3.7.1

Description

OVS bindings for python

Added to portage

2026-07-11

pangomm - 2.56.2
Ebuild name:

dev-cpp/pangomm-2.56.2

Description

C++ interface for pango

Added to portage

2026-07-11

pikepdf - 10.10.0
Ebuild name:

dev-python/pikepdf-10.10.0

Description

Python library to work with pdf files based on qpdf

Added to portage

2026-07-11

portage - 3.0.81.2
Ebuild name:

sys-apps/portage-3.0.81.2

Description

The package management and distribution system for Gentoo

Added to portage

2026-07-11

power-profiles-daemon - 0.30-r1
Ebuild name:

sys-power/power-profiles-daemon-0.30-r1

Description

Makes power profiles handling available over D-Bus

Added to portage

2026-07-11

pyarrow - 25.0.0
Ebuild name:

dev-python/pyarrow-25.0.0

Description

Python library for Apache Arrow

Added to portage

2026-07-11

python-pkcs11 - 0.9.5
Ebuild name:

dev-python/python-pkcs11-0.9.5

Description

PKCS11/Cryptoki support for Python

Added to portage

2026-07-11

pythran - 0.18.1-r1
Ebuild name:

dev-python/pythran-0.18.1-r1

Description

Ahead of Time compiler for numeric kernels

Added to portage

2026-07-11

regex - 2026.7.10
Ebuild name:

dev-python/regex-2026.7.10

Description

Alternative regular expression module to replace re

Added to portage

2026-07-11

s3transfer - 0.19.1
Ebuild name:

dev-python/s3transfer-0.19.1

Description

An Amazon S3 Transfer Manager

Added to portage

2026-07-11

selenium - 4.46.0
Ebuild name:

dev-python/selenium-4.46.0

Description

Python language binding for Selenium Remote Control

Added to portage

2026-07-11

selenium-manager - 4.46.0
Ebuild name:

dev-util/selenium-manager-4.46.0

Description

CLI tool that manages the browser/driver infrastructure required b

Added to portage

2026-07-11

unifont - 17.0.05
Ebuild name:

media-fonts/unifont-17.0.05

Description

GNU Unifont - a Pan-Unicode X11 bitmap iso10646 font

Added to portage

2026-07-11

virtualenv - 21.6.1
Ebuild name:

dev-python/virtualenv-21.6.1

Description

Virtual Python Environment builder

Added to portage

2026-07-11

wcmatch - 11.0
Ebuild name:

dev-python/wcmatch-11.0

Description

Wildcard/glob file name matcher

Added to portage

2026-07-11

websockets - 16.1
Ebuild name:

dev-python/websockets-16.1

Description

Library for building WebSocket servers and clients in Python

Added to portage

2026-07-11

wine-vanilla - 11.13
Ebuild name:

app-emulation/wine-vanilla-11.13

Description

Free implementation of Windows(tm) on Unix, without external patch

Added to portage

2026-07-11

xpadneo - 0.10.4
Ebuild name:

games-util/xpadneo-0.10.4

Description

Advanced Linux Driver for Xbox One Wireless Controller

Added to portage

2026-07-11

xrdb - 1.2.3
Ebuild name:

x11-apps/xrdb-1.2.3

Description

X server resource database utility

Added to portage

2026-07-11

xrefresh - 1.1.1
Ebuild name:

x11-apps/xrefresh-1.1.1

Description

refresh all or part of an X screen

Added to portage

2026-07-11

xset - 1.2.6
Ebuild name:

x11-apps/xset-1.2.6

Description

X.Org xset application

Added to portage

2026-07-11

xsetroot - 1.1.4
Ebuild name:

x11-apps/xsetroot-1.1.4

Description

X.Org xsetroot application

Added to portage

2026-07-11

rdf newsfeed | rss newsfeed | Atom newsfeed
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
- Copyright and legal notices -
Time to create this page: 64.4 ms