Using The Linux Console

From Some Wiki

Jump to: navigation, search

Contents

Introduction: Using the Linux Console

Contrary to what many linux newbies may think, the linux shell is not just the place to enter an occasional command - it is a complete computing environment that you can use without ever starting up X and your favorite window manager/desktop environment. It is also orders of magnitude faster than a GUI, though on most modern computers you may not really notice the GUI being slow. This page will list text-mode tools for just about every task you can think of. It is inspired by this ubuntuforums post. Since I myself use Ubuntu, there are some parts that are Ubuntu (or Debian-based-distro) specific.

To get more information on using any these tools, try

man toolname

You may also be interested in a general introduction/tutorial for using the Linux command line.

The sections below categorize applications by task.

This is a work in progress. I encourage you to add things to the list, or to leave comments in the discussion section.

Manipulate files locally

  • cp: copy
  • mv: move
  • rm: remove (delete)
  • mc: visual file manager
  • ytree: another visual file manager

View files

  • cat: print entire content to screen
  • zcat: same as cat, but able view zipped files
  • more: view file content one page at a time
  • zmore: same as more, but able to view zipped files
  • less: same as more, but with more features
  • strings: extract printable strings out of executable files
  • tail: view the last n lines of a file (can also do live monitoring)
  • head: view the first n lines of a file

I recommend less for a file pager.

Searching

  • find: find files
  • locate: find files (much faster than find because it uses a pre-built index)
  • grep: find strings within files

Edit text files

  • nano: newbie-friendly editor
  • vi: a very powerful editor that is rather difficult to learn
  • vim: like vi, but with more features
  • emacs: another very powerful editor that is also difficult to learn

Install/remove/manage software from repositories

  • apt-get
  • aptitude: same as apt-get, but with more features

Seems that aptitude is recommended by many.

Install software from a downloaded .deb

  • dpkg
  • gdebi: same as dpkg, but automatically installs dependencies as well

I recommend gdebi.

Browse the internet

  • lynx
  • links
  • links2
  • w3m
  • elinks

Of these, I recommend elinks, which is the most featureful.

Read email

  • pine: powerful email client, but no longer actively developed
  • alpine: successor to pine
  • mutt: another very nice email client

Read news (UseNet)

View images (yes, it is possible)

  • libcaca: very good text representation of images (ubuntu package caca-utils)
  • zgv: svgalib-based image viewer

Windowing environment

  • twin: a text-mode windowing environment (no longer actively developed)

Play audio

Download files

  • wget
  • curl
  • scp
  • ftp
  • sftp
  • lftp

Compress and extract files

  • zip and unzip
  • rar and unrar
  • tar
  • gzip and gunzip
  • bzip2 and bunzip2

IRC chat

Instant Messaging

  • centericq: AIM, ICQ, IRC, MSN, Yahoo, Jabber
  • naim: AIM, ICQ, IRC
  • bitlbee: plugin for irssi to connect to XMPP/Jabber (including Google Talk), MSN Messenger, Yahoo! Messenger, AIM and ICQ.

View system processes

  • ps: simple process list output
  • top: live process list view, with system resource usage info
  • htop: like top, but with loads more features

Recommend htop.

Bittorrent

  • btdownloadcurses
  • btlaunchmanycurses
  • rtorrent

Antivirus scan

Manage network

  • iptables
  • tracepath and traceroute
  • ping
  • whois
  • finger
  • netstat
  • ifconfig
  • iwconfig

Burn CDs and DVDs

  • cdrdao: burn CDs in disc-at-once mode
  • cdrecord: (now known as wodim) write CDs and DVDs
  • growisofs: (ubuntu package dvd+rw-tools) write DVDs

Games

Get help on commands

  • man
  • info
  • apropos (same thing as "man -k")

To be categorized

  • apt-cache(search for package)
  • fdisk (partition info/tool)
  • mkfs.X (make X filesystem)
  • dd (duplicate a disk)
  • cron/crontab (scheduling)
  • gpg (add repo keys)
  • screen (terminal screen manager)
  • scanimage (use your scanner to scan from commandline)

Related links