Search:  
Gentoo Wiki

List_of_UNIX_commands

Contents

Introduction

It is often the case that you are looking for a command-line tool to do something simple, and just don't know what it is called. This list is intended to be a comprehensive list of every command a Gentoo user ought to know.

To get the full benefit of this list, it is helpful to understand pipes and output redirection fully. One of the main principles of UNIX is the concept of creating small utilities that do one thing well, and then connecting them together somehow. Therefore, many of these utilites were designed to work well with pipes, and you can't do anything really complicated on the command line without understanding them. in

File and directory manipulation

These commands are used to move around and manipulate files and directories.

cd

Provided by: Included with shell

An abbreviation of 'change directory', changes the current working directory.

ls

Provided by: sys-apps/coreutils

Used to list files. Can be invoked with no arguments, to list the current directory, or with a directory or file as a target to list.

Useful options:

mv

Provided by: sys-apps/coreutils

Used to move or rename files. mv takes two or more arguments; when the last one is a directory, the file or files are moved there. If the last argument is a file, the previous file is renamed to that file. It is not allowed to move multiple files when the last argument isn't a directory.

Useful options:

pwd

Provided by: sys-apps/coreutils

Prints the name of the current working directory. Somewhat moot now that shell prompts usually include the current working directory, but still handy to know.

rm

Provided by: sys-apps/coreutils

Deletes files. A standard word of caution: rm does not use a Recycle Bin or any such utility; if you delete a file, odds are it is really and truly gone. So, use this command carefully.

Useful options:

slocate

Provided by: sys-apps/slocate

Searches for files quickly. Much faster than using find to search for files, because it keeps a database of all the files in the system for more efficient searching.

System information

These commands give you various information about your system.

ps

Provided by: sys-process/procps

Lists all the processes running on the system, from init all the way to itself. Usually run as "ps ax" or "ps aux" to list all the processes, instead of just the currently running ones from your user.

pstree

Provided by: sys-process/psmisc

The same as ps, but arranges the processes into a tree, allowing you to see what invoked what.

top

Provided by: sys-process/procps

Shows the processes on the system, sorted by resource usage. Useful for finding out which process is killing your CPU, or eating all your RAM.

Networking

ftp

Provided by: net-ftp/ftp

Accesses FTP servers through a simple interface, similar to the shell interface.

lynx

Provided by: www-client/lynx

A very simple text-based web browser.

ssh

Main article at SSH

Provided by: net-misc/openssh

Short for Secure SHell, allows you to start a shell on a remote computer, through an encrypted connection. Because of its port-forwarding capabilities, it is also often used to tunnel other sorts of traffic, such as X11 connections, securely.

wget

Provided by: net-misc/wget

General purpose tool for downloading from HTTP or FTP sites. In its simplest form, "wget URL" will download a file to the current directory, however, it is capable of much more, like resuming downloads.

Text processing

cat

Provided by: sys-apps/coreutils

cat concatenates files together, hence the name. Practically speaking, it takes one or more files as arguments, and reads them out to standard output. cat is useful for feeding data to other commands, and is also the quickest way of reading short text files.

less

Provided by: sys-apps/less

less is a general-purpose tool for reading files. Unlike cat and more, it allows scrolling backwards or forwards through a file, and can also search through files.

Multimedia processing

Retrieved from "http://www.gentoo-wiki.info/List_of_UNIX_commands"

Last modified: Fri, 05 Sep 2008 23:22:00 +0000 Hits: 985