Tutorials

[GNU Wget](http://www.gnu.org/software/wget/) is a nice tool for downloading resources from the internet. The basic usage is `wget url`:

The power of [wget](http://community.linuxmint.com/software/view/wget) is that you may download sites recursive, meaning you also get all pages (and images and other data) linked on the front page:

But many sites do not want you to download their entire site. To prevent this, they check how browsers identify. Many sites refuse you to connect or send a blank page if they detect you are not using a web-browser. You might get a message like:

*Sorry, but the download manager you are using to view this site is not supported. We do not support use of such download managers as flashget, go!zilla, or getright*

There is a very handy `-U` option for sites like this. Use

`-U My-browser`

to tell the site you are using some commonly accepted browser:

A web-site owner will probably get upset if you attempt to download his entire site using a simple

command. However, the web-site owner will not even notice you if you limit the download transfer rate and pause between fetching files.

To make sure you are not manually added to a blacklist, the most important command line options are` –limit-rate=` and` –wait= .`

To pause 20 seconds between retrievals you should add

`–wait=20`

and to limit the download rate use something like

`–limit-rate=20K`

as this option defaults to bytes, add K to set KB/s.

Example:

`wget –wait=20 –limit-rate=20K -r -p -U Mozilla http://www.stupidsite.com/restricedplace.html`

A very handy option that guarantees wget will not download anything from the folders beneath the folder you want to acquire is:

`–no-parent`

Use this to make sure wget does not fetch more than it needs to if you just want to download the files in a folder.

Read the [manual page](http://linuxreviews.org/man/wget/) for wget to learn more about GNU Wget. The full official manual is available [here](http://www.gnu.org/software/wget/manual/).

The original version of this how-to is available at http://linuxreviews.org/quicktips/wget/wget.en.pdf

Copyright © 2000-2004 [Øyvind Sæther](http://oyvinds.everdot.org/). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [“GNU Free Documentation License”](http://www.gnu.org/licenses/fdl.html).

### General Shortcuts for LibreOffice / OpenOffice

Ctrl + A : Select All Ctrl + F : Find and Replace Ctrl + Y : Redo last action

Ctrl + A : select all Ctrl + O : open Ctrl + S : save Alt + F4 : close window

### LibreOffice Writer / OpenOffice Writer

#### Text

Ctrl + E : Centered Ctrl + J : Justify Ctrl + L : Align Left Ctrl + R : Align Right Ctrl + D : Double Underline Ctrl + Shift + P : Superscript Ctrl + Shift + B : Subscript

#### Paragraph Style

Ctrl + 0 (zero) : Apply the Default style Ctrl + 1 : Apply the Heading 1 style Ctrl + 2 : Apply the Heading 2 style Ctrl + 3 : Apply the Heading 3 style Ctrl + 5 : 1.5 Line Spacing

Ctrl + Plus Key (+) : Calculates the selected text and copies the result to the clipboard Ctrl + Hyphen (-) : Custom hyphens; hyphenation set by you Ctrl + Shift + minus sign (-) : Non-breaking dash (is not used for hyphenation). Ctrl + * (multiplication sign on number pad) : Run macro field. Ctrl + Space : Non-breaking spaces that are not used for hyphenation and are not expanded if the text is justified Shift + Enter : Line break without paragraph change Ctrl + Enter : Manual page break Ctrl + Shift + Enter : Column break in multi-columnar texts Alt + Enter : Inserting a new paragraph without numbering; Alt + Enter : Inserting a new paragraph directly before or after a section or a table Arrow Left : Move cursor to left Shift + Arrow Left : Move cursor with selection to the left Ctrl + Arrow Left : Go to beginning of word Ctrl + Shift + Arrow Left : Selecting to the left word by word Arrow Right : Move cursor to right Shift + Arrow Right : Move cursor with selection to the right Ctrl + Arrow Right : Go to end of word Ctrl + Shift + Arrow Right : Selecting to the right word by word Arrow Up : Move up one line Shift + Arrow Up : Selecting lines in an upwards direction Arrow Down : Move cursor down one line Shift + Arrow Down : Selecting lines in a downward direction Home : Go to beginning of line Shift + Home : Go and select to the beginning of a line End : Go to end of line Shift + End : Go and select to end of line Ctrl + Home : Go to start of document Ctrl + Shift + Home : Go and select text to start of document Ctrl + End : Go to end of document Ctrl + Shift + End : Go and select text to end of document Ctrl + Page Up : Switch cursor between text and header Ctrl + Page Down : Switch cursor between text and footer Insert : Insert mode on/off Page Up : Screen page up Shift + Page Up : Move up screen page with selection Page Down : Move down screen page Shift + Page Down : Move down screen page with selection Ctrl + Delete : Delete text to end of word Ctrl + Backspace : Delete text to beginning of word Ctrl + Shift + Delete : Delete text to end of sentence Ctrl + Shift + Backspace : Delete text to beginning of sentence Ctrl + Tab : Next suggestion with Automatic Word Completion Ctrl + Shift + Tab : Use previous suggestion with Automatic Word Completion Alt + W : Spell checker dialog; call back the original unknown word into the text box Ctrl + Shift + F10 or Ctrl + mouse double-click : Dock or un-dock the Navigator, Styles and Formatting window, or other windows

#### Tables

Ctrl + A : If the active cell is empty, selects the whole table; otherwise it selects the contents of the active cell; pressing it a second time selects the entire table Ctrl + Home : If the active cell is empty, moves the cursor to the beginning of the table; pressing it again moves the cursor to the beginning of document; if the active cell is not empty, moves the cursor to the beginning of the active cell; pressing it a second time moves the cursor to the beginning of the current table; a third press moves the cursor to the beginning of the document Ctrl + End : If the active cell is empty, moves the cursor to the end of the table; pressing it again moves the cursor to the end of document; if the active cell is not empty, moves the cursor to the end of the active cell; pressing it a second time moves the cursor to the end of the current table; a third press moves the cursor to the end of the document Ctrl + Tab : Inserts a tab stop (only in tables); depending on the Window Manager in use, the Alt + Tab may be used instead Ctrl + Shift + Arrow Up : Jumps to start of table Ctrl + Shift + Arrow Down : Jumps to end of table Alt + Arrow Keys : Increases or decreases the size of the column or row on the right or bottom cell edge Alt + Shift + Arrow Keys : Increases or decreases the size of the column or row on the left or top cell edge Ctrl + Alt + Shift + Arrow Keys : Like Alt, but only the active cell is modified. Alt + Insert : Provides 3 seconds in Insert mode, during which time pressing an Arrow Key inserts a row or column, or Ctrl + Arrow Key will insert a cell Alt + Delete : Provides 3 seconds in Delete mode, during which time pressing an Arrow Key deletes a row or column, or Ctrl + Arrow Key merges the active cell with the neighbouring cell Ctrl + Shift + T : Removes cell protection from all selected tables; if no table is selected, then cell protection is removed from all of the tables in the document Ctrl + Shift + Delete : If nothing is selected, the contents of the next cell will be deleted; if cells are selected, the whole row(s) of the selection will be deleted; if all rows are selected completely or partially, the entire table will be deleted

#### Paragraphs And Heading Levels

Ctrl + Alt + Up Arrow or Ctrl + Up Arrow : Moves the active paragraph or selected paragraphs up one paragraph Ctrl + Alt + Down Arrow or Ctrl + Down Arrow : Moves the active paragraph or selected paragraphs down one paragraph Tab : The heading in format Heading X (X = 1-9) is moved down one level in the outline Shift + Tab : The heading in format Heading X (X = 2-10) is moved up one level in the outline Ctrl + Tab : At the start of a heading, inserts a tab stop. Depending on the Window Manager in use, Alt+Tab may be used instead; to change the heading level with the keyboard, first position the cursor in front of the heading

### LibreOffice Math / OpenOffice Math

Ctrl + Alt + Delete : Shut down F3 : Repeat again F2 : Help F5 : Refresh Ctrl + B : Bold Ctrl + U : Underline Ctrl + End : Go bottom Ctrl + Home : Go on top F7 : Enter query Ctrl + F : Find Ctrl + R : Replace Ctrl + P : Print Ctrl + G : Go to Ctrl + E : Eject Ctrl + V : Paste Ctrl + C : Copy F10 : Save Backspace : Go back Shift + Delete : Delete all Shift + Down Arrow : Move downwards Esc : Exit

### LibreOffice Impress / OpenOffice Impress

F2 : Edit text F3 : Edit group Ctrl + F3 : Exit group Shift + F3 : Duplicate F4 : Position and Size F5 : View Slide Show Ctrl + Shift + F5 : Navigator F7 : Spell check Ctrl + F7 : Thesaurus F8 : Edit Points Ctrl + Shift + F8 : Fit text to frame F11 : Styles and Formatting

#### Navigating In Slide Sorter

Esc : Moves the focus to the first slide. Arrow Keys : Moves the focus to the next slide. Spacebar : Makes the slide with the focus the current slide.

#### Normal View

+ (Plus sign) : Zoom in - (Minus sign) : Zoom out * : Fit page in window / : Zoom in on current selection Shift + Ctrl + G : Group selected objects Shift + Ctrl + Alt + A : Un-group selected group Ctrl + Mouse Click : Enter a group Shift + Ctrl + K : Combine selected objects Ctrl + Plus (+) : Bring to Front Shift + Ctrl + Plus (+) : Bring Forward Ctrl + Minus (-) : Send Backward Shift + Ctrl + Minus (-) : Send to Back

#### Slide Shows

Esc : End presentation Spacebar : Play next effect (if any) Alt + Page Down : Go to next slide without playing effects 2 + Enter : Type a number of a slide (e.g. 2) and press Enter to go to the slide Alt + Page Up : Go to the previous slide without playing effects Home : Jump to first slide in the slide show End : Jump to the last slide in the slide show Ctrl + Page Up : Go to the previous slide Ctrl + Page Down : Go to the next slide B : Show black screen until next key or mouse wheel event W : Show white screen until next key or mouse wheel event

### LibreOffice Draw / OpenOffice Draw

Enter : Activates the focused button in a dialog Esc : Terminates the action or dialog; in Help goes up one level Spacebar : Toggles the focused check box in a dialog Arrow Keys : Changes the active control field in an option section of a dialog Tab : Advances focus to the next section or element in a dialog Shift + Tab : Moves the focus to the previous section or element in a dialog Alt + Down Arrow : Opens the list of the control field currently selected in a dialog; these shortcut keys apply not only to combo boxes but also to icon buttons with pop-up menus; close an opened list by pressing the Esc key Delete : Deletes the selected items into the Recycle Bin Shift + Delete : Deletes the selected items without putting them in the Recycle Bin Ctrl + O : Opens a document Ctrl + S : Saves the current document Ctrl + N : Creates a new document Ctrl + P : Prints document Ctrl + C : Copies the selected items Ctrl + Shift + V : Opens the Paste Special dialog

### LibreOffice Calc / OpenOffice Calc

Ctrl + Home : Moves the cursor to the first cell in the sheet (A1) Ctrl + End : Moves the cursor to the last cell on the sheet that contains data Home : Moves the cursor to the first cell of the current row End : Moves the cursor to the last cell of the current row in a column containing data Ctrl + Left Arrow : Moves the cursor to the left edge of the current data range; if the column to the left of the cell that contains the cursor is empty Ctrl + Right Arrow : Moves the cursor to the right edge of the current data range; if the column to the right of the cell that contains the cursor is empty Ctrl + Up Arrow : Moves the cursor to the top edge of the current data range; if the row above the cell that contains the cursor is empty Ctrl + Down Arrow : Moves the cursor to the bottom edge of the current data range; if the row below the cell that contains the cursor is empty Ctrl + Shift + Arrow Keys : Selects all cells containing data from the current cell to the end of the continuous range of data cells Ctrl + Page Up : Moves one sheet to the left; in the Page Preview it moves to the previous print page Ctrl + Page Up : Moves one sheet to the left; in the Page Preview it moves to the previous print page Ctrl + Page Down : Moves one sheet to the right; in the Page Preview it moves to the next print page Page Up : Moves the viewable rows up one screen Page Down : Moves the viewable rows down one screen Alt + Page Up : Moves the viewable columns one screen to the left Alt + Page Down : Moves the viewable columns one screen to the right Shift + Ctrl + Page Up : Adds the previous sheet to the current selection of sheets; if all the sheets in a spreadsheet are selected Shift + Ctrl + Page Down : Adds the next sheet to the current selection of sheets; if all the sheets in a spreadsheet are selected Ctrl + * (multiplication sign on the numeric key pad) : Selects the data range that contains the cursor; a range is a contiguous cell range that contains data and is bounded by empty row and columns Ctrl + / (division sign on the numeric key pad) : Selects the matrix formula range that contains the cursor Shift + F1 : Displays context help Ctrl + F1 : Displays the note that is attached to the current cell F2 : Switches to Edit mode and places the cursor at the end of the contents of the current cell; if the cursor is in an input box in a dialog that has a minimize button Ctrl + F2 : Opens the Function Wizard Shift + Ctrl + F2 : Moves the cursor to the input line where you can enter a formula for the current cell Alt + Down Arrow : Increases the height of current row Alt + Right Arrow : Increases the width of the current column Alt + Shift + Arrow Keys : Optimizes the column width or row height based on the current cell F12 : Groups the selected data range Shift + F11 : Creates a document template F9 : Recalculates all of the formulas in the sheet F8 : Turns additional selection mode on or off in this mode Ctrl + F8 : Highlights cells containing numeric values (not text) F7 : Checks spelling in the current sheet F4 : Shows or hides the Database Sources menu

### LibreOffice Base / OpenOffice Base

Ctrl + O : Open entry in the File menu Alt : Calling Menus Shift + Ctrl + S : Open the Special Characters dialog to insert one or more special characters Ctrl + A : Select the entire text Ctrl + Delete : Delete everything from the cursor position to the end of the word Insert : Switch between the insert mode and the overwrite mode and back again Ctrl + Z : Undo modifications one step at a time Shift + Ctrl + Q : Terminate a macro that is currently running Ctrl + S : Saves the current document Ctrl + N : Creates a new document Shift + Ctrl + N : Opens Templates and Documents dialog Ctrl + P : Prints document Ctrl + Q : Exits the application Ctrl + X : Cuts out the selected elements Ctrl + C : Copies the selected items Ctrl + V : Pastes from the clipboard Ctrl + Shift + V : Opens the Paste Special dialog Ctrl + Y : Redo the last action Ctrl + F : Calls the Find & Replace dialog Ctrl + Shift + F : Search for the last entered search term Ctrl + Shift + J : Toggle the view between fullscreen mode and normal mode in Writer or Calc Ctrl + Shift + R : Redraws the document view Shift + Ctrl + I : Enable or disable the selection cursor in read-only text Ctrl + I : Apply the Italic attribute to the selected area Ctrl + B : Apply the Bold attribute to the selected area Ctrl + U : Apply the Underlined attribute to the selected area

#### Function Keys

F1 : Starts the Help Shift + F1 : Context Help Shift + F2 : Turns on Extended Tips for the currently selected command. icon or control Alt + F4 : Closes the current document (close OpenOffice when the last open document is closed) F6 : Sets focus in next subwindow (e.g. document/data source view) Shift + F6 : Sets focus in previous subwindow F10 : Activates the first menu (File menu) Shift + F10 : Opens the context menu Ctrl + F11 : Opens the Style Catalog

#### Drawing Objects

Tab : Selects the next Drawing Object Ctrl + Home : Selects the first Drawing Object Ctrl + End : Selects the last Drawing Object Esc : Ends Drawing Object selection Shift + Spacebar : Select an additional point in Point Selection mode

#### Gallery Preview Area

Ctrl + Shift + Insert : Inserts the selected object as a linked object into the current document Ctrl + I : Inserts a copy of the selected object into the current document Ctrl + T : Opens the Enter Title dialog Ctrl + P : Switches between themes view and object view Spacebar : Spacebar Switches between themes view and object view

#### Table Selection

Spacebar : Spacebar toggles row selection, except when the row is in edit mode Ctrl + Spacebar : Toggles row selection Shift + Spacebar : Selects the current column

Recommended reading:

[Tutorials For OpenOffice.org](http://www.tutorialsforopenoffice.org/)

[OpenOffice Keyboard Shortcuts](http://www.shortcutmania.com/applicationListByVendor_filterSun+Microsystems.htm) - ShortcutMania.com online database of keyboard shortcuts

[The Linux Documentation Project](http://www.tldp.org/sorted_howtos_full.html) is working towards developing free, high quality documentation for the Linux operating system:

1. [subject-specific help](http://www.tldp.org/docs.html#howto) 2. [longer, in-depth books](http://www.tldp.org/guides.html) 3. [Frequently Asked Questions](http://www.tldp.org/FAQ/) 4. [help on individual commands](http://www.tldp.org/manpages/man.html) 5. [online magazine](http://www.tldp.org/LDP/LGNET/archives.html) 6. [additional documents of interest](http://www.tldp.org/docs.html#lf) 7. [work in progress](http://wiki.tldp.org/Page_Status)

The overall goal of the Linux Documentation Project is to [collaborate in all of the issues of Linux documentation](http://www.tldp.org/manifesto.html).

You can have Linux use a swap file instead of a partition. You can also have Windows (via something like SwapFS - see http://www.acc.umu.se/~bosse/ or the mirror at http://branten.se/nt/) use a swap partition and move your pagefile.sys to it.

SwapFs is a driver for Windows that let you use a Linux swap partition for temporary storage, like a RAM-disk. It is possible to put Windows page file on it. It is implemented as a disk filter driver. New in release 2.1 Works with swap partitions bigger than 4GB, works on 64-bit systems. New in release 2: Works with standby and hibernation on Windows 2000/XP.

You should also know that there are two files for the Windows operating system: the paging file (pagefile.sys) for swap and the hibernation file (hiberfil.sys), which stores the system state when the Windows operating system goes into “hibernate” mode.

As mentioned in the swapfs.reg file, you should know that /dev/hda1 in Linux is equivalent to \\Device\\Harddisk0\\Partition1 in Windows NT. Please note that an extended partition number is skipped in the enumeration.

So, if your partition is sda4, you should try with

`SwapDevice“=“\\Device\\Harddisk0\\Partition4`

and

`S:”=“\\Device\\Harddisk0\\Partition4`

If it fails, you may need to write Harddisk1 instead of Harddisk0.

To learn more about the [Filesystem Hierarchy Standard](http://www.pathname.com/fhs/), download the PDF file from [here](http://www.pathname.com/fhs/pub/fhs-2.3.pdf).

The Root Filesystem Hierarchy

/ : Root directory

/bin : Essential user command binaries (for use by all users)

/boot : Static files of the bootloader

/dev : Device files

/etc : Host-specific system configuration

/etc/opt : Configuration files for /opt

/etc/X11 : Configuration for the X Window System (optional)

/etc/sgml : Configuration files for SGML (optional)

/etc/xml : Configuration files for XML (optional)

/home : User home directories (optional)

/lib: Essential shared libraries and kernel modules

/lib32 and /lib64 : 32/64-bit libraries (architecture dependent) - alternate format essential shared libraries (optional)

/media : Mount point for removeable media

/mnt : Mount point for a temporarily mounted filesystem

/opt : Add-on application software packages

/proc : Kernel and process information virtual filesystem

/root : Home directory for the root user (optional)

/sbin : Essential system binaries

/srv : Data for services provided by this system

/tmp : Temporary files

The /usr Hierarchy

/usr/X11R6 : X Window System, Version 11 Release 6 (optional)

/usr/bin : Most user commands

/usr/include : Directory for standard include files, header files included by C programs.

/usr/lib : Libraries for programming and packages

/usr/lib32 or /usr/lib64 : Alternate format libraries (optional)

/usr/local : Local hierarchy

/usr/local/share : Shared stuff

/usr/sbin: Non-essential standard system binaries

/usr/share : Architecture-independent data

/usr/share/dict : Wordlists (optional)

/usr/share/man : Manual pages

/usr/share/misc : Miscellaneous architecture-independent data

/usr/share/sgml: SGML data (optional)

/usr/share/xml : XML data (optional)

/usr/src : Source code (optional)

The /var Hierarchy

/var/account : Process accounting logs (optional)

/var/cache : Application cache data

/var/cache/fonts : Locally-generated fonts (optional)

/var/cache/man: Locally-formatted manual pages (optional)

/var/crash : System crash dumps (optional)

/var/games : Variable game data (optional)

/var/lib : Variable state information

/var/lib/ : Editor backup files and state (optional)

/var/lib/hwclock : State directory for hardware clock (optional)

/var/lib/misc : Miscellaneous variable data

/var/lock : Lock files

/var/log : Log files and directories

/var/mail : User mailbox files (optional)

/var/opt : Variable data for /opt

/var/run : Run-time variable data

/var/spool : Application spool data

/var/spool/cron : cron and at jobs

/var/spool/lpd : Line-printer daemon print queues (optional)

/var/spool/rwho : Rwhod files (optional)

/var/tmp : Temporary files preserved between system reboots

/var/yp : Network Information Service (NIS) database files (optional)

### System Info

date – Show the current date and time cal – Show this month's calendar uptime – Show current uptime w – Display who is online whoami – Who you are logged in as finger *user* – Display information about *user* uname -a – Show kernel information cat /proc/cpuinfo – CPU information cat /proc/meminfo – Memory information df -h – Show disk usage du – Show directory space usage free – Show memory and swap usage

### Keyboard Shortcuts

Enter – Run the command Up Arrow – Show the previous command Ctrl + R – Allows you to type a part of the command you're looking for and finds it

Ctrl + Z – Stops the current command, resume with fg in the foreground or bg in the background Ctrl + C – Halts the current command, cancel the current operation and/or start with a fresh new line Ctrl + L – Clear the screen

*command* | less – Allows the scrolling of the bash command window using Shift + Up Arrow and Shift + Down Arrow !! – Repeats the last command *command* !$ – Repeats the last argument of the previous command Esc + . (a period) – Insert the last argument of the previous command on the fly, which enables you to edit it before executing the command

Ctrl + A – Return to the start of the command you're typing Ctrl + E – Go to the end of the command you're typing Ctrl + U – Cut everything before the cursor to a special clipboard, erases the whole line Ctrl + K – Cut everything after the cursor to a special clipboard Ctrl + Y – Paste from the special clipboard that Ctrl + U and Ctrl + K save their data to Ctrl + T – Swap the two characters before the cursor (you can actually use this to transport a character from the left to the right, try it!) Ctrl + W – Delete the word / argument left of the cursor in the current line

Ctrl + D – Log out of current session, similar to exit

### Learn the Commands

apropos *subject* – List manual pages for *subject* man -k *keyword* – Display man pages containing *keyword* man *command* – Show the manual for *command* man -t *man* | ps2pdf - > *man.pdf* – Make a pdf of a manual page which *command* – Show full path name of *command* time *command* – See how long a *command* takes

whereis *app* – Show possible locations of *app* which *app* – Show which *app* will be run by default; it shows the full path

### Searching

grep *pattern* *files* – Search for *pattern* in *files* grep -r *pattern* *dir* – Search recursively for *pattern* in *dir* *command |* grep *pattern* – Search for *pattern* in the output of *command* locate *file* – Find all instances of *file* find / -name *filename* – Starting with the root directory, look for the file called *filename* find / -name ”filename – Starting with the root directory, look for the file containing the string *filename* locate *filename* – Find a file called *filename* using the locate command; this assumes you have already used the command updatedb (see next) updatedb – Create or update the database of files on all file systems attached to the Linux root directory which *filename* – Show the subdirectory containing the executable file called *filename* grep *TextStringToFind* /*dir* – Starting with the directory called *dir*, look for and list all files containing *TextStringToFind*

### File Permissions

chmod *octal* *file* – Change the permissions of *file* to *octal*, which can be found separately for user, group, and world by adding: 4 – read ®, 2 – write (w), 1 – execute (x) Examples: chmod 777 – read, write, execute for all chmod 755 – rwx for owner, rx for group and world For more options, see man chmod.

### File Commands

ls – Directory listing ls -l – List files in current directory using long format ls -laC – List all files in current directory in long format and display in columns ls -F – List files in current directory and indicate the file type ls -al – Formatted listing with hidden files

cd *dir* – Change directory to *dir* cd – Change to home mkdir *dir* – Create a directory *dir* pwd – Show current directory

rm *name* – Remove a file or directory called *name* rm *-r dir* – Delete directory *dir* rm -f *file* – Force remove *file* rm -rf *dir* – Force remove an entire directory *dir* and all it’s included files and subdirectories (use with extreme caution)

cp *file1 file2* – Copy *file1* to *file2* cp -r *dir1 dir2* – Copy *dir1* to *dir2*; create *dir2* if it doesn't exist cp *file* /home/*dirname* – Copy the filename called *file* to the /home/dirname directory

mv *file* /home/*dirname* – Move the *file* called filename to the */home/dirname* directory mv *file1 file2* – Rename or move *file1* to *file2*; if *file2* is an existing directory, moves *file1* into directory *file2*

ln -s *file link* – Create symbolic link *link* to *file* touch *file* – Create or update *file* cat > *file* – Places standard input into *file* cat *file* – Display the file called *file*

more *file* – Display the file called *file* one page at a time, proceed to next page using the spacebar head *file* – Output the first 10 lines of *file* head -20 *file* – Display the first 20 lines of the file called *file* tail *file* – Output the last 10 lines of *file* tail -20 *file* – Display the last 20 lines of the file called *file* tail -f *file* – Output the contents of *file* as it grows, starting with the last 10 lines

### Compression

tar cf *file.tar files* – Create a tar named *file.tar* containing *files* *tar xf file.tar* – Extract the files from *file.tar*

tar czf *file.tar.gz files* – Create a tar with Gzip compression tar xzf *file.tar.gz* – Extract a tar using Gzip

*tar cjf file.tar.bz2* – Create a tar with Bzip2 compression tar xjf *file.tar.bz2* – Extract a tar using Bzip2

gzip *file* – Compresses *file* and renames it to *file.gz* gzip -d *file.gz* – Decompresses *file.gz* back to *file*

### Printing

/etc/rc.d/init.d/lpd start – Start the print daemon /etc/rc.d/init.d/lpd stop – Stop the print daemon /etc/rc.d/init.d/lpd status – Display status of the print daemon lpq – Display jobs in print queue lprm – Remove jobs from queue lpr – Print a file lpc – Printer control tool man *subject* | lpr – Print the manual page called *subject* as plain text man -t *subject* | lpr – Print the manual page called *subject* as Postscript output printtool – Start X printer setup interface

### Network

ifconfig – List IP addresses for all devices on the local machine iwconfig – Used to set the parameters of the network interface which are specific to the wireless operation (for example: the frequency) iwlist – used to display some additional information from a wireless network interface that is not displayed by iwconfig ping *host* – Ping *host* and output results whois *domain* – Get whois information for *domain* dig *domain* – Get DNS information for *domain* dig -x *host* – Reverse lookup *host* wget *file* – Download *file* wget -c *file* – Continue a stopped download

### SSH

ssh *user*@*host* – Connect to *host* as *user* ssh -p *port user*@*host* – Connect to *host* on port *port* as *user* ssh-copy-id *user*@*host* – Add your key to *host* for *user* to enable a keyed or passwordless login

### User Administration

adduser *accountname* – Create a new user call *accountname* passwd *accountname* – Give *accountname* a new password su – Log in as superuser from current login exit – Stop being superuser and revert to normal user

### Process Management

ps – Display your currently active processes top – Display all running processes kill *pid* – Kill process id *pid* killall *proc* – Kill all processes named *proc* (use with extreme caution) bg – Lists stopped or background jobs; resume a stopped job in the background fg – Brings the most recent job to foreground fg *n* – Brings job *n* to the foreground

### Installation from source

./configure make make install dpkg -i *pkg.deb* – install a DEB package (Debian / Ubuntu / Linux Mint) rpm -Uvh *pkg.rpm* – install a RPM package (Red Hat / Fedora)

### Stopping & Starting

shutdown -h now – Shutdown the system now and do not reboot halt – Stop all processes - same as above shutdown -r 5 – Shutdown the system in 5 minutes and reboot shutdown -r now – Shutdown the system now and reboot reboot – Stop all processes and then reboot - same as above startx – Start the X system

Recommended reading:

[Cheat-Sheets.org](http://www.cheat-sheets.org/#Linux) – All cheat sheets, round-ups, quick reference cards, quick reference guides and quick reference sheets in one page. The only one you need.

[Tutorial: The best tips & tricks for bash, explained](http://www.linuxtutorialblog.com/post/tutorial-the-best-tips-tricks-for-bash) – Linux Tutorial Blog / Quality Linux tutorials without clutter

[LinuxCommand.org](http://linuxcommand.org/) – Learning the shell, Writing shell scripts, Script library, SuperMan pages, Who, What, Where, Why

[LinuxManPages.com](http://linuxmanpages.com/) – General commands, System calls, Subroutines, Special files, File formats, Games, Macros and conventions, Maintenence commands, Most Popular Man Pages

[Linux Man Pages from die.net](http://linux.die.net/man/) – Man pages are grouped into sections, to see the full list of Linux man pages for a section, pick one. Or you can browse Linux man pages by name; choose the first letter of the name of the Linux command, function, or file you are interested in.

[Linux Newbie Guide: Shorcuts and Commands](http://www.unixguide.net/linux/linuxshortcuts.shtml) – Linux essential shortcuts and sanity commands; Common Linux commands - system info; Basic operations, network apps, file (de)compression; Process control; Basic administration commands, accessing drives/partitions; Network administration tools, music-related commands, graphics-related commands.

[Sudo Manual Pages](http://www.gratisoft.us/sudo/man.html) – Sudo (su “do”) allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments. For more information, see the [introduction to Sudo](http://www.gratisoft.us/sudo/intro.html). Sudo is *free software*, distributed under an [ISC-style license](http://www.gratisoft.us/sudo/license.html).

[LinOxide.com](http://linoxide.com/linux-command/linux-commands-cheat-sheet/) – Linux Commands Cheat Sheet in Black & White

Enter your comment. Wiki syntax is allowed:
O W O L M
 
  • tutorials.txt
  • Last modified: 2021/12/04 11:40
  • by alexio