Top Banner

of 18

Dos & Linux Commands & Ubuntu Insatll

Jul 07, 2018

Download

Documents

Sai Tarun
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    1/18

    Basic DOS Commands

    DOS (Disk Operation System) is a tool which allows you to control the operation

    of the IBM PC. DOS is software which was written to control hardware. ere is a

    summary of some essential DOS commands.

    Change Drive

    !o chan"e the default dri#e indicated at the DOS prompt$ type the letter of the dri#e

    followed %y a colon (&). 'or eample$ to chan"e the dri#e from * to +,-uot&

    *&/ +& 0enter1

    Change Directory

    2se the CDI3 (CD) command to chan"e the directory. 'or eample$ to chan"e the

    directory from C&Pro"ramsfolder to D&arcadefolder&

    C&Pro"ramsfolder/ cd D&arcadefolder 0enter1

    !hen$ to na#i"ate to di"du"$ a su%directory of D&arcadefolder&

    D&arcadefolder/ cd di"du" 0enter1

    4ikewise$ cd .. na#i"ates to the parent directory (i.e.$ up one le#el)$ while cd

    na#i"ates to the root directory (typically the C dri#e).

    Copy Something

    !o copy a files or directories in DOS$ it is necessary to use the copy

    command.!he default dri#e indicated in the DOS propmpt is of no concern when

    copyin" an item. 'iles or folders may %e copied from anywhere to anywhere$ re"ardless

    of the prompt dri#e. 'or eample$ to copy the file$ pacman.ee from the directory

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    2/18

    D&arcade to the directory C&pro"rams (notice that the location indicated for the

    DOS prompt is different from %oth the source directory and the copy directory)&

    C&different/ copy D&arcadepacman.ee C&pro"rams 0enter1

    ere$ we repeat the pre#ious copy command$ while simultaneously renamin" the file toms5pacman.ee&

    C&different/ copy D&arcadepacman.ee C&pro"ramsms5pacman.ee 0enter1

    !he copy command may %e "enerali6ed as follows&

    0prompt location1/ copy 0source item1 0tar"et location10optional rename1 0enter1

    List Directory Contents

    2se the dir (directory) command to list the contents of a directory. 'ile names and their

    correspondin" si6es will %e displayed. 'or eample$ to list the contents of the C dri#e&

    *&/ dir C& 0enter1

    Similarly$ to list the contents of any directory$ anydir&

    *&/ dir C&anydir 0enter1

    4ikewise$ to list the contents of any su%directory of * (i.e.$ the current location as

    indicated in the DOS prompt)&

    *&/ dir su%dir 0enter1

    ere are some more hot dir tips&

    *&/ dir 0enter1 (lists contents of current directory$ *)

    *&/ dir 7w 0enter1 (lists contents of current directory in wide format)

    *&/ dir 7w 7p 0enter1 (lists contents of current directory in wide format$ one screen at a

    time)

    *&/ dir +&8.tt 0enter1 (lists all .tt files on dri#e +)

    *&/ dir +&8.t99 0enter1 (lists all files with etension %e"innin" with t)

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    3/18

    Erase Something

    !o delete an item$ use the deadly erase command. 'or eample$ if you want to delete

    the file$ terminated.:p"$ located on the + dri#e&

    *&/ erase +&terminated.:p" 0enter1

    !o delete a file within the directory indicated in the DOS prompt$ no additional directory

    information is needed&

    *&/ erase terminated.:p" 0enter1

    If you would like to erase all of the contents of a directory$ say$ +&

    *&/ erase +&8.8 0enter1

    Format Something

    !o format a dri#e$ use the format command. 'ormattin" a disk in#ol#es error

    checkin" and directory creation. 'or eample$ if you want to format the floppy disk in

    dri#e ; (note& disk formattin" re-uires user input re"ardin" se#eral options presented

    durin" the process)&

    *&/ format ;& 0enter1

    Create a Directory

    !o create a new directory$ use the mkdir command. 'or eample$ to create a

    directory called ry"ar within the +&arcade directory&

    *&/ mkdir +&arcade&ry"ar 0enter1

    !his is e#en easier if you wish to create a directory within the current directory (i.e.$ the

    directory listed in the DOS prompt). 'or eample$ to create a ry"ar directory within

    the +&arcade directory while in +&arcade&

    +&arcade/ mkdir ry"ar 0enter1

    Rename Something

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    4/18

    !o rename an item$ use the ren command. 'or eample$ to rename the file

    atari.ee to nintendo.ee&

    *&/ ren +&arcadeatari.ee nintendo.ee 0enter1

    Reboot the Computer

    !o re%oot the computer while in DOS$ use e#ery%odyho knew it.

    Change the Date

    !o chan"e the system date simply type date and enter the desired date accordin"

    to the format specified at the prompt.

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    5/18

    Change the Time

    !o chan"e the system time simply type time and enter the desired time

    accordin" to the format specified at the prompt.

    Return to Windows

    !o eit DOS mode and return to >indows$ type windows at the DOS command

     prompt.

    Eit DOS

    !o eit DOS$ type eit at the DOS prompt.

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    6/18

    Basic Linu Commands

    mkdir - make directories

    Usage

    mkdir [OPTION] DIRECTORY

    Options

    Create the DIRECTORY(ies), i the! do not a"read! e#ist$

     %andator! arg&ments to "ong options are mandator! or short options too$

     'm, mode%ODE set permission mode (as in hmod), not r*#r*#r*# ' &mask

     'p, parents no error i e#isting, make parent diretories as needed

     '+, +erose print a message or eah reated diretor!

     'he"p disp"a! this he"p and e#it

     '+ersion o&tp&t +ersion inormation and e#it

    cd - change directories

    Use d to hange diretories$ T!pe d o""o*ed ! the name o a diretor! to aess thatdiretor!$-eep in mind that !o& are a"*a!s in a diretor! and an na+igate to diretorieshierarhia""! ao+e or e"o*$

    mv- change the name of a directory

    T!pe m+ o""o*ed ! the &rrent name o a diretor! and the ne* name o the diretor!$

     E#. m+ testdir ne*namedir

    pwd - print working directory

    *i"" sho* !o& the &"" path to the diretor! !o& are &rrent"! in$ This is +er! hand! to &se,espeia""! *hen perorming some o the other ommands on this page

     rmdir - Remove an existing directory

     rm -r

    Remo+es diretories and i"es *ithin the diretories re&rsi+e"!$

    chown - change file owner and group

    Usage

    ho*n [OPTION] O/NER[.[0ROUP]] 1I2E

    ho*n [OPTION] .0ROUP 1I2E

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    7/18

    ho*n [OPTION] ''reereneR1I2E 1I2E

    Options

    Change the o*ner and3or gro&p o eah 1I2E to O/NER and3or 0ROUP$ /ith ''reerene, hangethe o*ner and gro&p o eah 1I2E to those o R1I2E$

     ', hanges "ike +erose &t report on"! *hen a hange is made

     'dereerene aet the reerent o eah s!mo"i "ink, rather than the s!mo"i "ink itse" 

     'h, no'dereerene aet eah s!mo"i "ink instead o an! reerened i"e (&se&" on"! ons!stems that an hange the o*nership o a s!m"ink)

     'romCURRENT4O/NER.CURRENT40ROUP

      hange the o*ner and3or gro&p o eah i"e on"! i its &rrent o*ner and3or gro&p math thosespeiied here$ Either ma! e omitted, in *hih ase a math is not re5&ired or the omittedattri&te$

    'no'preser+e'root do not treat 637 speia""! (the dea&"t)

    'preser+e'root ai" to operate re&rsi+e"! on 637

    ', 'si"ent, '5&iet s&ppress most error messages

    'reereneR1I2E &se R1I2E7s o*ner and gro&p rather than the spei!ing O/NER.0ROUP +a"&es

    'R, 're&rsi+e operate on i"es and diretories re&rsi+e"!

    '+, '+erose o&tp&t a diagnosti or e+er! i"e proessed

    The o""o*ing options modi! ho* a hierarh! is tra+ersed *hen the 'R option is a"so speiied$ Imore than one is speiied, on"! the ina" one takes eet$

    '8 i a ommand "ine arg&ment is a s!mo"i "ink to a diretor!, tra+erse it

    '2 tra+erse e+er! s!mo"i "ink to a diretor! eno&ntered

    'P do not tra+erse an! s!mo"i "inks (dea&"t)

    chmod - change file access permissions

    Usage

    hmod ['r] permissions i"enames

     r Change the permission on i"es that are in the s&diretories o the diretor! that !o& are&rrent"! in$ permission 9peiies the rights that are eing granted$ :e"o* is the dierentrights that !o& an grant in an a"pha n&meri ormat$i"enames 1i"e or diretor! that !o& areassoiating the rights *ith Permissions

    & ' User *ho o*ns the i"e$

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    8/18

    g ' 0ro&p that o*ns the i"e$

    o ' Other$

    a ' ;""$

    r ' Read the i"e$

    * ' /rite or edit the i"e$

    # ' E#e&te or r&n the i"e as a program$

    N&meri Permissions.

    C8%OD an a"so to attri&ted ! &sing N&meri Permissions.

    = *rite ! gro&p

    ==> *rite ! an!od!

    ?== e#e&te ! o*ner

    =?= e#e&te ! gro&p

    ==? e#e&te ! an!od!

    ls - Short listing of directory contents

    'a "ist hidden i"es

    'd "ist the name o the &rrent diretor!

    '1 sho* diretories *ith a trai"ing 737

      e#e&ta"e i"es *ith a trai"ing 7@7

    'g sho* gro&p o*nership o i"e in "ong "isting

    'i print the inode n&mer o eah i"e

    '" "ong "isting gi+ing detai"s ao&t i"es and diretories

    'R "ist a"" s&diretories eno&ntered

    't sort ! time modiied instead o name

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    9/18

    cp - Copy files

    p m!i"e !o&ri"e

    Cop! the i"es Am!i"eA to the i"e A!o&ri"eA in the &rrent *orking diretor!$ This ommand *i""reate the i"e A!o&ri"eA i it doesn7t e#ist$ It *i"" norma""! o+er*rite it *itho&t *arning i it e#ists$

    p 'i m!i"e !o&ri"e

    /ith the A'iA option, i the i"e A!o&ri"eA e#ists, !o& *i"" e prompted eore it is o+er*ritten$

    p 'i 3data3m!i"e

    Cop! the i"e A3data3m!i"eA to the &rrent *orking diretor! and name it Am!i"eA$ Prompt eoreo+er*riting the i"e$

    p 'dpr srdir destdir

    Cop! a"" i"es rom the diretor! AsrdirA to the diretor! AdestdirA preser+ing "inks ('poption), i"eattri&tes ('p option), and op! re&rsi+e"! ('r option)$ /ith these options, a diretor! and a"" itontents an e opied to another dir

    ln - Creates a symbolic link to a file.

    "n 's test s!m"ink

    Creates a s!mo"i "ink named s!m"ink that points to the i"e test T!ping A"s 'i test s!m"inkA *i""sho* the t*o i"es are dierent *ith dierent inodes$ T!ping A"s '" test s!m"inkA *i"" sho* thats!m"ink points to the i"e test$

    locate ' ; ast dataase dri+en i"e "oator$

    slocate -u

    This ommand &i"ds the s"oate dataase$ It *i"" take se+era" min&tes to omp"ete thisommand$This ommand m&st e &sed eore searhing or i"es, ho*e+er ron r&ns thisommand periodia""! on most s!stems$"oate *hereis 2ists a"" i"es *hose names ontain thestring A*hereisA$ diretor!$

    more - ;""o*s i"e ontents or piped o&tp&t to e sent to the sreen one page at a time

    less - Opposite o the more ommand

    cat ' 9ends i"e ontents to standard o&tp&t$ This is a *a! to "ist the ontents o short i"es to the

    sreen$ It *orks *e"" *ith piping$

    whereis ' Report a"" kno*n instanes o a ommand

    wc - Print !te, *ord, and "ine o&nts

    bg

    g Bos P"aes the &rrent Bo (or, ! &sing the a"ternati+e orm, the speiied Bos) in theakgro&nd, s&spending its e#e&tion so that a ne* &ser prompt appears immediate"!$ Use

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    10/18

    the Bos ommand to diso+er the identities o akgro&nd Bos$

    cal month year ' Prints a a"endar or the speiied month o the speiied !ear$

    cat files ' Prints the ontents o the speiied i"es$

    clear - C"ears the termina" sreen$

    cmp file1 file2 - Compares t*o i"es, reporting a"" disrepanies$ 9imi"ar to the di ommand,tho&gh the o&tp&t ormat diers$

    diff file1 file2 ' Compares t*o i"es, reporting a"" disrepanies$ 9imi"ar to the mp ommand,tho&gh the o&tp&t ormat diers$

    dmesg - Prints the messages res&"ting rom the most reent s!stem oot$

    fg

    g Bos ' :rings the &rrent Bo (or the speiied Bos) to the oregro&nd$

    file files - Determines and prints a desription o the t!pe o eah speiied i"e$

    find path -name pattern -print

    9earhes the speiied path or i"es *ith names mathing the speiied pattern (&s&a""! en"osedin sing"e 5&otes) and prints their names$ The indommand has man! other arg&ments and&ntions see the on"ine do&mentation$

    finger users - Prints desriptions o the speiied &sers$

    free - Disp"a!s the amo&nt o &sed and ree s!stem memor!$

    ftp hostname

    Opens an 1TP onnetion to the speiied host, a""o*ing i"es to e transerred$The 1TP program pro+ides s&ommands or aomp"ishing i"e transers see the on"inedo&mentation$

    head files - Prints the irst se+era" "ines o eah speiied i"e$

    ispell files - Cheks the spe""ing o the ontents o the speiied i"es$

    kill processids

    ki"" ' signa" proess4ids

    ki"" '"

    -i""s the speiied proesses, sends the speiied proesses the speiied signa" (gi+en as a n&meror name), or prints a "ist o a+ai"a"e signa"s$

    killall program

    ki""a"" ' signa" program

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    11/18

    -i""s a"" proesses that are instanes o the speiied program or sends the speiied signa" to a""proesses that are instanes o the speiied program$

    mail - 2a&nhes a simp"e mai"  "ient that permits sending and reei+ing emai" messages$

    man title

    man setion tit"e ' Prints the speiied man page$

    ping host ' 9ends an eho re5&est +ia TCP3IP to the speiied host$ ; response onirms that thehost is operationa"$

    reboot ' Reoots the s!stem (re5&ires root pri+i"eges)$

    shutdown minutes

    sh&tdo*n 'r min&tes

    9h&ts do*n the s!stem ater the speiied n&mer o min&tes e"apses (re5&ires root pri+i"eges)$The 'r option a&ses the s!stem to e reooted one it has sh&t do*n$

    sleep time - Ca&ses the ommand interpreter to pa&se or the speiied n&mer o seonds$

    sort files - 9orts the speiied i"es$ The ommand has man! &se&" arg&ments see the on"inedo&mentation$

    split file - 9p"its a i"e into se+era" sma""er i"es$ The ommand has man! arg&ments see theon"ine do&mentation

    sync - Comp"etes a"" pending inp&t3o&tp&t operations (re5&ires root pri+i"eges)$

    telnet host ' Opens a "ogin session on the speiied host$

    top - Prints a disp"a! o s!stem proesses that7s ontin&a""! &pdated &nti" the &ser pressesthe 5 ke!$

    traceroute host ' Uses eho re5&ests to determine and print a net*ork path to the host$

    uptime - Prints the s!stem &ptime$

    w - Prints the &rrent s!stem &sers$

    wall - Prints a message to eah &ser e#ept those *ho7+e disa"ed message reeption$ T!pe Ctrl-! to end the message

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    12/18

    2%untu ?@.?A Desktop Installation uide

    • Boot Computer with 2%untu?@.?A installation DD ?@.?A

    • >elcome screen of 2%untu ?@.?A

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    13/18

    •  Preparin" to install 2%untu$ select options and click continue.

    •  Installation type selection.

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    14/18

    • Select nearest city in your time 6one.

    •  ey%oard selection.

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    15/18

    • 'ill information and continue.

    • Installation is in pro"ress. !his may take se#eral minutes.

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    16/18

    • Installation is completed$ e:ect CD7DD and restart.

    • Bootin" your 2%untu Bo.

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    17/18

    • 4o"in screen.

    • 2%untu Desktop.

  • 8/18/2019 Dos & Linux Commands & Ubuntu Insatll

    18/18

    • 2%untu Desktop with system settin"s.