Preview

Linux Bash Shell Cheat Sheet

Powerful Essays
Open Document
Open Document
1361 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Linux Bash Shell Cheat Sheet
freeworld.posterous.com

Linux Bash Shell
Cheat Sheet
(works with about every distribution, except for apt-get which is Ubuntu/Debian exclusive)

Legend:
Everything in “” is to be replaced, ex: --> iLovePeanuts.txt
Don't include the '=' in your commands
'..' means that more than one file can be affected with only one command ex: rm file.txt file2.txt movie.mov .. ..

Linux Bash Shell Cheat Sheet
Basic Commands
Basic Terminal Shortcuts

Basic file manipulation

CTRL L = Clear the terminal
CTRL D = Logout
SHIFT Page Up/Down = Go up/down the terminal
CTRL A = Cursor to start of line
CTRL E = Cursor the end of line
CTRL U = Delete left of the cursor
CTRL K = Delete right of the cursor
CTRL W = Delete word on the left
CTRL Y = Paste (after CTRL U,K or W)
TAB = auto completion of file or command
CTRL R = reverse search history
!! = repeat last command

cat = show content of file
(less, more) head = from the top
-n

CTRL Z = stops the current command (resume with fg in foreground or bg in background)

cp image.jpg newimage.jpg = copy and rename a file

Basic Terminal Navigation

cp cp cp cp image.jpg / = copy to folder image.jpg folder/sameImageNewName.jpg
-R stuff otherStuff = copy and rename a folder
*.txt stuff/ = copy all of * to folder

mv mv mv mv mv

file.txt Documents/ = move file to a folder = move folder in folder filename.txt filename2.txt = rename file stuff/newfileName
/ .. = move folder up in hierarchy

rm rm rm rm .. = delete file (s)
-i .. = ask for confirmation each file
-f = force deletion of a file
-r / = delete folder

ls ls ls ls ls

-a = list all files and folders = list files in folder
-lh = Detailed list, Human readable
-l *.jpg = list jpeg files only
-lh = Result for file only

cd = change directory if folder name has spaces use “ “ cd / = go to root cd .. = go up one folder, tip: ../../../ du -h: Disk usage of folders, human readable du -ah:

You May Also Find These Documents Helpful

  • Powerful Essays

    Which of the following symbols instructs the shell to redirect the output of a command to the specified file instead of the screen and overwrite the file?…

    • 2385 Words
    • 10 Pages
    Powerful Essays
  • Good Essays

    Nt1310 Unit 1 Study Guide

    • 846 Words
    • 4 Pages

    27. In a command line, what is the purpose of the ? in a filename?…

    • 846 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    The -v option of the grep command displays only lines that do not contain the search pattern…

    • 604 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Nt1430 Unit 2

    • 393 Words
    • 2 Pages

    IF it starts with / it is absolute value. If it does not contain a / or . it is a simple file.…

    • 393 Words
    • 2 Pages
    Good Essays
  • Good Essays

    It250

    • 272 Words
    • 2 Pages

    Which of the following Linux utilities lists the names of files in a single directory?…

    • 272 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Intro to Unix Project 2

    • 636 Words
    • 3 Pages

    2- Description of pipes: The symbol | is the Unix pipe symbol that is used on the command line. What it means is that the standard output of the command to the left of the pipe gets sent as standard input of the command to the right of the pipe. Note that this functions a lot like the > symbol used to redirect the standard output of a command to a file. However, the pipe is different because it is used to pass the output of a command to another command, not a file.…

    • 636 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Ceh Cheat Sheet

    • 3910 Words
    • 16 Pages

    Controls use of personal financial data HIPPA - Health Imformation Portability and Protection Act Privacy for medical records…

    • 3910 Words
    • 16 Pages
    Powerful Essays
  • Better Essays

    Chapter 8 LINUX Answers

    • 1190 Words
    • 5 Pages

    1. You have obtained a new utility, called watchit, to monitor security on your computer,…

    • 1190 Words
    • 5 Pages
    Better Essays
  • Satisfactory Essays

    Unit 2 Explore and Discuss

    • 1383 Words
    • 6 Pages

    C.1.a) POSIX - a family of standards specified by the IEEE for maintaining compatibility between operating systems.…

    • 1383 Words
    • 6 Pages
    Satisfactory Essays
  • Better Essays

    Study Guide

    • 5753 Words
    • 24 Pages

    The well-developed arthropod nervous system consists of a double ventral nerve cord, an anterior brain, and several ganglia.…

    • 5753 Words
    • 24 Pages
    Better Essays
  • Powerful Essays

    cheat sheet

    • 1430 Words
    • 6 Pages

    3. Find all employees who live in the same city and street as their manager (3 pts)…

    • 1430 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    Operating System

    • 1099 Words
    • 5 Pages

    Answer: d. It redirects the output of one command to the input of another command.…

    • 1099 Words
    • 5 Pages
    Good Essays
  • Good Essays

    ids cheat sheet

    • 988 Words
    • 3 Pages

    An operation increases its production level and observes that the cost of producing each unit decreases.…

    • 988 Words
    • 3 Pages
    Good Essays
  • Good Essays

    cheat sheet

    • 1437 Words
    • 5 Pages

    1. The sociological perspective, as a way of thinking about the world, includes the sociological imagination from C. Wright Mills, the beginner’s mind from Bernard McGrane, and the idea of culture shock from anthropology. Explain what all three of these concepts have in common.…

    • 1437 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Study Guide

    • 1347 Words
    • 6 Pages

    COMPANY BACKGROUND: EasyFind manufactures and sells golf balls. The company is conducting a price test to find a better price point. Presently their golf balls sell for $19 per dozen. Their current volume is 5,470 dozen per month. They are considering reducing their sales price by 20% per dozen.…

    • 1347 Words
    • 6 Pages
    Good Essays

Related Topics