unix command.doc

(69 KB) Pobierz
The total number of Unix commands is immense

The total number of Unix commands is immense. No normal user or system administrator would ever need to know them all.

The Unix commands available to you will vary based upon several factors:

·         The version of Unix you are using (FreeBSD, Linux, Solaris, AIX, HP-UX, OpenBSD, etc...)

·         The Unix shell you are using (sh, csh, tcsh, ksh, bash, etc...)

·         The packages installed on the system and the way the system is configured

·         Your access level on the system

In this FAQ, I will address only Bash shell commands, as all other major shells can now be considered obsolete.

This list of basic Unix commands will get you started using and learning Unix.

Use the Unix `man` command to learn more about any of these commands.

Basic Unix Commands

Unix Command

Description

ls

List directory contents

cp

Copy files

rm

Remove directory entries

file

Determine file type

find

Walk a file hierarchy

which

Locate a program file in the user's path

whereis

Locate programs

gcc, g++

GNU project C and C++ Compiler

gdb

The GNU Debugger

less

View the contents of a text file

diff

Find differences between two files

cmp

Compare two files

vi

Text editor

chmod

Change file modes

man

Display the on-line manual pages

mv

Move and rename files

ispell

Interactive spelling checker

biff

Be notified if mail arrives and who it is from

lpr

Print a file

lpq

Show the print queue

ftp

Transfer a file to another Unix system

logout

Quit using the system

pwd

Print working directory name

cd

Change working directory

ln

Make a file link

mkdir

Make directories

rmdir

Remove directories

chmod

Change file modes

quota

Display disk usage and limits

history

Display a list of recent commands

ps

Show the status of processes

kill

Stop a running processes

passwd

Change your password

alias

Create a command alias

unalias

Delete a command alias

export

Set an environment variable

script

Record your terminal session to a file

bg

Send a job to the background

fg

Bring a job to the foreground

jobs

Print a list of current jobs

The basic Unix commands are fairly standard across the various Unix platforms, although command arguments differ at times. In addition, the basic Unix commands vary between Unix shells.

Learning the Unix Operating System
Learning the Unix Operating System

If you're new to Unix, this concise book will tell you just what you need to get started and no more. This fifth edition is the most effective introduction to Unix in print, covering Internet usage for email, file transfers, and web browsing. It's an ideal primer for Mac and PC users who need to know a little about Unix on the systems they visit. The new edition also contains many major and minor updates to help the reader navigate Unix's ever-expanding capabilities. In response to the popularity of Linux, the book now focuses on the popular bash shell preferred by most Linux users. A new chapter explains how to use ftp, pine for mail, and offers useful knowledge on how to surf the web. And the author has included tips throughout the text on security basics, especially in the Internet and networking sections. The book includes a completely updated quick reference card to make it easier for the reader to access the key functions of the command line.

 

Zgłoś jeśli naruszono regulamin