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:

90707

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-11-26
alertmanager - 0.35.1
Ebuild name:

app-metrics/alertmanager-0.35.1

Description

Alertmanager for alerts sent by client applications such as Prometh

Added to portage

2026-11-26

ansible-compat - 26.11.1
Ebuild name:

dev-python/ansible-compat-26.11.1

Description

Contains functions that facilitate working with various versions

Added to portage

2026-11-26

bleachbit - 6.0.6
Ebuild name:

sys-apps/bleachbit-6.0.6

Description

Clean junk to free disk space and to maintain privacy

Added to portage

2026-11-26

c-blosc2 - 3.9.0
Ebuild name:

dev-libs/c-blosc2-3.9.0

Description

Blocking, shuffling and lossless compression library

Added to portage

2026-11-26

c-client - 2007f_p7-r2
Ebuild name:

net-libs/c-client-2007f_p7-r2

Description

UW IMAP c-client library

Added to portage

2026-11-26

cachetools - 8.0.3
Ebuild name:

dev-python/cachetools-8.0.3

Description

Extensible memoizing collections and decorators

Added to portage

2026-11-26

chrony_exporter - 0.16.0
Ebuild name:

app-metrics/chrony_exporter-0.16.0

Description

Chrony NTP exporter for Prometheus

Added to portage

2026-11-26

cli-helpers - 2.15.5
Ebuild name:

dev-python/cli-helpers-2.15.5

Description

Python helpers for common CLI tasks

Added to portage

2026-11-26

cython - 3.3.2
Ebuild name:

dev-python/cython-3.3.2

Description

A Python to C compiler

Added to portage

2026-11-26

dnscrypt-proxy - 2.1.21
Ebuild name:

net-dns/dnscrypt-proxy-2.1.21

Description

Flexible DNS proxy, with support for encrypted DNS protocols

Added to portage

2026-11-26

dnsdist - 2.1.4
Ebuild name:

net-dns/dnsdist-2.1.4

Description

A highly DNS-, DoS- and abuse-aware loadbalancer

Added to portage

2026-11-26

exim - 4.100.2
Ebuild name:

mail-mta/exim-4.100.2

Description

A highly configurable, drop-in replacement for sendmail

Added to portage

2026-11-26

fonttools - 4.69.1
Ebuild name:

dev-python/fonttools-4.69.1

Description

Library for manipulating TrueType, OpenType, AFM and Type1 fonts

Added to portage

2026-11-26

forbiddenfruit - 0.1.5
Ebuild name:

dev-python/forbiddenfruit-0.1.5

Description

Patch built-in Python objects

Added to portage

2026-11-26

fzf - 0.75.0
Ebuild name:

app-shells/fzf-0.75.0

Description

General-purpose command-line fuzzy finder, written in Golang

Added to portage

2026-11-26

gentoodo - 0.2.0
Ebuild name:

app-portage/gentoodo-0.2.0

Description

Generate reminder emails for Gentoo package maintainers

Added to portage

2026-11-26

gitea - 28.4.0
Ebuild name:

www-apps/gitea-28.4.0

Description

A painless self-hosted Git service

Added to portage

2026-11-26

haproxy - 3.0.32
Ebuild name:

net-proxy/haproxy-3.0.32

Description

A TCP/HTTP reverse proxy for high availability environments

Added to portage

2026-11-26

haproxy - 3.2.28
Ebuild name:

net-proxy/haproxy-3.2.28

Description

A TCP/HTTP reverse proxy for high availability environments

Added to portage

2026-11-26

htmlize - 1.59
Ebuild name:

app-emacs/htmlize-1.59

Description

HTML-ize font-lock buffers in Emacs

Added to portage

2026-11-26

httpd - 1.1-r1
Ebuild name:

app-emacs/httpd-1.1-r1

Description

A HTTP server embedded in the Emacs

Added to portage

2026-11-26

intellij-idea - 2026.3.0.1
Ebuild name:

dev-util/intellij-idea-2026.3.0.1

Description

A complete toolset for web, mobile and enterprise development

Added to portage

2026-11-26

kubo - 0.43.1
Ebuild name:

net-p2p/kubo-0.43.1

Description

Main implementation of IPFS

Added to portage

2026-11-26

libdispatch - 6.4.3
Ebuild name:

dev-libs/libdispatch-6.4.3

Description

Library for concurrent code execution on multicore hardware

Added to portage

2026-11-26

markdown - 3.11.4
Ebuild name:

dev-python/markdown-3.11.4

Description

Python implementation of the markdown markup language

Added to portage

2026-11-26

mkvtoolnix - 104.0
Ebuild name:

media-video/mkvtoolnix-104.0

Description

Tools to create, alter, and inspect Matroska files

Added to portage

2026-11-26

pg_background - 2.0.5
Ebuild name:

dev-db/pg_background-2.0.5

Description

Postgres Background Worker

Added to portage

2026-11-26

pip - 26.3-r1
Ebuild name:

dev-python/pip-26.3-r1

Description

The PyPA recommended tool for installing Python packages

Added to portage

2026-11-26

pipewire - 1.6.12
Ebuild name:

media-video/pipewire-1.6.12

Description

Multimedia processing graphs

Added to portage

2026-11-26

pixi - 0.85.0
Ebuild name:

dev-util/pixi-0.85.0

Description

A package management and workflow tool

Added to portage

2026-11-26

prosody - 13.0.8
Ebuild name:

net-im/prosody-13.0.8

Description

Prosody is a modern XMPP communication server

Added to portage

2026-11-26

py-spy - 0.4.4
Ebuild name:

dev-util/py-spy-0.4.4

Description

Sampling profiler for Python programs

Added to portage

2026-11-26

pymongo - 4.20.2
Ebuild name:

dev-python/pymongo-4.20.2

Description

Python driver for MongoDB

Added to portage

2026-11-26

python-openstackclient - 10.6.0
Ebuild name:

dev-python/python-openstackclient-10.6.0

Description

A client for the OpenStack APIs

Added to portage

2026-11-26

qt5-sqlcipher - 1.1.0-r2
Ebuild name:

dev-db/qt5-sqlcipher-1.1.0-r2

Description

Qt SQL driver plugin for SQLCipher

Added to portage

2026-11-26

reaper-bin - 7.86-r3
Ebuild name:

media-sound/reaper-bin-7.86-r3

Description

Digital audio workstation

Added to portage

2026-11-26

regex - 2026.11.25
Ebuild name:

dev-python/regex-2026.11.25

Description

Alternative regular expression module to replace re

Added to portage

2026-11-26

restic - 0.20.0
Ebuild name:

app-backup/restic-0.20.0

Description

A backup program that is fast, efficient and secure

Added to portage

2026-11-26

snobol - 2.3.5
Ebuild name:

dev-lang/snobol-2.3.5

Description

Phil Budne's port of Macro SNOBOL4 in C, for modern machines

Added to portage

2026-11-26

testfixtures - 12.5.0
Ebuild name:

dev-python/testfixtures-12.5.0

Description

A collection of helpers and mock objects for unit tests and doc test

Added to portage

2026-11-26

thunderbird - 153.8.0
Ebuild name:

mail-client/thunderbird-153.8.0

Description

Thunderbird Mail Client

Added to portage

2026-11-26

thunderbird - 161.0
Ebuild name:

mail-client/thunderbird-161.0

Description

Thunderbird Mail Client

Added to portage

2026-11-26

thunderbird-bin - 153.8.0
Ebuild name:

mail-client/thunderbird-bin-153.8.0

Description

Thunderbird Mail Client

Added to portage

2026-11-26

thunderbird-bin - 161.0
Ebuild name:

mail-client/thunderbird-bin-161.0

Description

Thunderbird Mail Client

Added to portage

2026-11-26

thunderbird-l10n - 153.8.0
Ebuild name:

mail-client/thunderbird-l10n-153.8.0

Description

Thunderbird mail client's translation files

Added to portage

2026-11-26

thunderbird-l10n - 161.0
Ebuild name:

mail-client/thunderbird-l10n-161.0

Description

Thunderbird mail client's translation files

Added to portage

2026-11-26

urwid - 5.2.1
Ebuild name:

dev-python/urwid-5.2.1

Description

Curses-based user interface library for Python

Added to portage

2026-11-26

valijson - 1.1.5
Ebuild name:

dev-cpp/valijson-1.1.5

Description

Header-only C++ library for JSON Schema validation

Added to portage

2026-11-26

zope-schema - 8.2
Ebuild name:

dev-python/zope-schema-8.2

Description

Zope schema Architecture

Added to portage

2026-11-26

zstandard - 0.25.0-r1
Ebuild name:

dev-python/zstandard-0.25.0-r1

Description

Zstandard Bindings for Python

Added to portage

2026-11-26

2026-11-25
aioquic - 1.9.2
Ebuild name:

dev-python/aioquic-1.9.2

Description

An implementation of QUIC and HTTP/3

Added to portage

2026-11-25

aseprite - 1.3.18.6
Ebuild name:

dev-games/aseprite-1.3.18.6

Description

Animated sprite editor & pixel art tool

Added to portage

2026-11-25

aws-crt-cpp - 0.44.6
Ebuild name:

dev-cpp/aws-crt-cpp-0.44.6

Description

C++ wrapper around the aws-c-* libraries

Added to portage

2026-11-25

babel - 2.19.0
Ebuild name:

dev-python/babel-2.19.0

Description

Collection of tools for internationalizing Python applications

Added to portage

2026-11-25

dulwich - 1.2.22
Ebuild name:

dev-python/dulwich-1.2.22

Description

Pure-Python implementation of the Git file formats and protocols

Added to portage

2026-11-25

grafana-bin - 12.4.16
Ebuild name:

www-apps/grafana-bin-12.4.16

Description

Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & Ope

Added to portage

2026-11-25

grafana-bin - 13.1.11
Ebuild name:

www-apps/grafana-bin-13.1.11

Description

Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & Ope

Added to portage

2026-11-25

grafana-bin - 13.2.7
Ebuild name:

www-apps/grafana-bin-13.2.7

Description

Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & Open

Added to portage

2026-11-25

grafana-bin - 13.3.2
Ebuild name:

www-apps/grafana-bin-13.3.2

Description

Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & Open

Added to portage

2026-11-25

grpcio - 1.85.4
Ebuild name:

dev-python/grpcio-1.85.4

Description

HTTP/2-based RPC framework

Added to portage

2026-11-25

grpcio-status - 1.85.4
Ebuild name:

dev-python/grpcio-status-1.85.4

Description

Reference package for GRPC Python status proto mapping

Added to portage

2026-11-25

huawei-lte-api - 3.0.0
Ebuild name:

dev-python/huawei-lte-api-3.0.0

Description

API For huawei LAN/WAN LTE Modems

Added to portage

2026-11-25

kbfs - 9999
Ebuild name:

app-crypt/kbfs-9999

Description

Keybase Filesystem (KBFS)

Added to portage

2026-11-25

keepsecret - 26.08.3
Ebuild name:

app-crypt/keepsecret-26.08.3

Description

Password manager GUI for SecretService providers

Added to portage

2026-11-25

keybase - 6.0.2
Ebuild name:

app-crypt/keybase-6.0.2

Description

Keybase client

Added to portage

2026-11-25

keybase - 6.2.4
Ebuild name:

app-crypt/keybase-6.2.4

Description

Keybase client

Added to portage

2026-11-25

keybase - 9999
Ebuild name:

app-crypt/keybase-9999

Description

Keybase client

Added to portage

2026-11-25

krita - 6.0.5
Ebuild name:

media-gfx/krita-6.0.5

Description

Free digital painting application. Digital Painting, Creative Freedom

Added to portage

2026-11-25

libetonyek - 0.1.15
Ebuild name:

app-text/libetonyek-0.1.15

Description

Library parsing Apple Keynote presentations

Added to portage

2026-11-25

libetonyek - 9999
Ebuild name:

app-text/libetonyek-9999

Description

Library parsing Apple Keynote presentations

Added to portage

2026-11-25

libmspub - 0.1.6
Ebuild name:

app-text/libmspub-0.1.6

Description

Library parsing Microsoft Publisher documents

Added to portage

2026-11-25

libtmux - 0.68.0
Ebuild name:

dev-python/libtmux-0.68.0

Description

Typed library that provides an ORM wrapper for tmux, a terminal multiplex

Added to portage

2026-11-25

libvisio - 0.1.12
Ebuild name:

media-libs/libvisio-0.1.12

Description

Library parsing the file format of MS Visio documents

Added to portage

2026-11-25

linux-firmware - 20261124
Ebuild name:

sys-kernel/linux-firmware-20261124

Description

Linux firmware files

Added to portage

2026-11-25

ollama - 0.40.18
Ebuild name:

sci-ml/ollama-0.40.18

Description

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

Added to portage

2026-11-25

openstacksdk - 4.25.0
Ebuild name:

dev-python/openstacksdk-4.25.0

Description

A collection of libraries for building applications to work with Ope

Added to portage

2026-11-25

pbs-installer - 2026.11.24
Ebuild name:

dev-python/pbs-installer-2026.11.24

Description

Installer for Python Build Standalone

Added to portage

2026-11-25

plotly - 7.2.0
Ebuild name:

dev-python/plotly-7.2.0

Description

Browser-based graphing library for Python

Added to portage

2026-11-25

pylsqpack - 1.1.3
Ebuild name:

dev-python/pylsqpack-1.1.3

Description

Python wrapper for the ls-qpack QPACK library

Added to portage

2026-11-25

pysnmp - 7.1.34
Ebuild name:

dev-python/pysnmp-7.1.34

Description

Python SNMP library

Added to portage

2026-11-25

python-glanceclient - 4.14.0
Ebuild name:

dev-python/python-glanceclient-4.14.0

Description

A client for the OpenStack Glance API

Added to portage

2026-11-25

quazip - 1.7.2
Ebuild name:

dev-libs/quazip-1.7.2

Description

Simple C++ wrapper over Gilles Vollant's ZIP/UNZIP package

Added to portage

2026-11-25

rr - 5.10.0
Ebuild name:

dev-debug/rr-5.10.0

Description

Record and Replay Framework

Added to portage

2026-11-25

simdjson - 5.3.0
Ebuild name:

dev-libs/simdjson-5.3.0

Description

SIMD accelerated C++ JSON library

Added to portage

2026-11-25

sqlglot - 30.35.0
Ebuild name:

dev-python/sqlglot-30.35.0

Description

An easily customizable SQL parser and transpiler

Added to portage

2026-11-25

tomlkit - 0.15.3
Ebuild name:

dev-python/tomlkit-0.15.3

Description

Style preserving TOML library

Added to portage

2026-11-25

trakit - 0.6.0
Ebuild name:

dev-python/trakit-0.6.0

Description

Identify a track from its title

Added to portage

2026-11-25

urwid - 5.2.0
Ebuild name:

dev-python/urwid-5.2.0

Description

Curses-based user interface library for Python

Added to portage

2026-11-25

uv - 0.13.10
Ebuild name:

dev-python/uv-0.13.10

Description

A Python package installer and resolver, written in Rust

Added to portage

2026-11-25

uv-build - 0.13.10
Ebuild name:

dev-python/uv-build-0.13.10

Description

PEP517 uv build backend

Added to portage

2026-11-25

wand - 0.7.3
Ebuild name:

dev-python/wand-0.7.3

Description

Ctypes-based simple ImageMagick binding for Python

Added to portage

2026-11-25

wine-proton - 11.0.3-r1
Ebuild name:

app-emulation/wine-proton-11.0.3-r1

Description

Valve Software's fork of Wine

Added to portage

2026-11-25

zellij - 0.46.1
Ebuild name:

app-misc/zellij-0.46.1

Description

A terminal workspace with batteries included

Added to portage

2026-11-25

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