10 lsof command examples in linux.pdf

Upload: victor-l-wamukoya

Post on 02-Apr-2018

253 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    1/13

    7/29/13 10 lsof Command Examples in Linux

    www.tecmint.com/10-lsof-command-examples-in-linux/ 1/13

    Search

    Select Language Pow ered by Translate

    Advertise

    Hire Us

    Submit Articles

    Archives

    Who We Are?

    Contact Us

    Privacy PolicyCopyright Policy

    Home

    Linux Distros

    Open Source

    Web Servers

    Databases Linux Commands

    TecMint.com is a community driven Linux website. Our motto is to provide an effortless howtos to our valuablereaders.

    You are also welcome to join our community and can be part of our team, contributing and submitting well written article on Linux. If you have any query, please

    contact us by email tecmint.com [at] gmail [dot] com or use ourcontact form.

    http://www.tecmint.com/category/linux-commands/http://www.tecmint.com/http://www.tecmint.com/copyright-policy/http://www.tecmint.com/privacy-policy/http://www.tecmint.com/contact-us/http://www.tecmint.com/archives/http://www.tecmint.com/submit-articles/https://googleads.g.doubleclick.net/aclk?sa=l&ai=CdtZT2QH2UeWYI8aoigaVwoGYBoOourEDw5HcrYIBjIuFngsQASCssJ4eUJe6mtQBYJUDoAGv6YP-A8gBAqgDAcgD0QSqBJIBT9AMROJ8chdd3stmRq2E8ctKYtoOCBK9n0mei3zBiqXGwg5tazH1Flc2oBkGgzbhSN4Ani73mEmTg2zQ0MRSoX0-ZC6l8LSHb4ccIS0l2p5KBG-ntLM4SCacGzVLDsXxLTWg80btT2JrHr_rjm0tNzrYk162wE8Jynb3JOGCn-H2Ylk9EvksYkUOqA8TOkcNcoygBgKAB7mW_AE&num=1&sig=AOD64_2ZFLlVTvZ8N7t6E6ebK4KzjXXUyw&client=ca-pub-2601749019656699&adurl=http://www.isaca.org/Info/MarketingCertification/CISM_Exam.html%3Fcid%3D1000438%26Appeal%3DGooglehttp://www.tecmint.com/contact-us/http://www.tecmint.com/submit-articles/http://www.tecmint.com/category/linux-commands/http://www.tecmint.com/category/databaseshttp://www.tecmint.com/category/web-servershttp://www.tecmint.com/category/open-sourcehttp://www.tecmint.com/category/linux-distroshttp://www.tecmint.com/http://www.tecmint.com/http://www.tecmint.com/copyright-policy/http://www.tecmint.com/privacy-policy/http://www.tecmint.com/contact-us/http://www.tecmint.com/who-we-are/http://www.tecmint.com/archives/http://www.tecmint.com/submit-articles/http://www.tecmint.com/hire-us/http://www.tecmint.com/advertise/http://translate.google.com/
  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    2/13

    Linux CPU Socket Linux Box IPV6

    https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-2601749019656699&output=html&h=15&slotname=1986283779&w=468&lmt=1375060659&flash=11.8.800&url=http%3A%2F%2Fwww.tecmint.com%2F10-lsof-command-examples-in-linux%2F&dt=1375076834507&bpp=13&bdt=5307&shv=r20130718&cbv=r20130206&saldr=sa&prev_slotnames=8210224606&correlator=1375076834819&frm=20&adk=70527109&ga_vid=1383198307.1375071488&ga_sid=1375076834&ga_hid=1376084322&ga_fc=1&u_tz=180&u_his=1&u_java=1&u_h=768&u_w=1360&u_ah=724&u_aw=1360&u_cd=32&u_nplug=20&u_nmime=152&dff=open%20sans&dfs=12&adx=147&ady=460&biw=1344&bih=620&oid=3&fu=16&ifi=2&dtd=2653&xpc=7H6C42eOGV&p=http%3A//www.tecmint.com&rl_rc=true&adsense_enabled=true&ad_type=text&ui=rc:0&oe=utf8&height=15&width=468&format=fpkc_al_lp&kw_type=radlink&prev_fmts=468x15_0ads_al&rt=ChBR9gHbAAcMsArCY-6JAEtREgRJUFY2GghElMsR1Su7EigBUhMI-43VroDUuAIVx5HCCh0OZQBa&hl=en&kw0=Linux+CPU&kw1=Socket&kw2=Linux+Box&kw3=IPV6&okw=IPV6https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-2601749019656699&output=html&h=15&slotname=1986283779&w=468&lmt=1375060659&flash=11.8.800&url=http%3A%2F%2Fwww.tecmint.com%2F10-lsof-command-examples-in-linux%2F&dt=1375076834507&bpp=13&bdt=5307&shv=r20130718&cbv=r20130206&saldr=sa&prev_slotnames=8210224606&correlator=1375076834819&frm=20&adk=70527109&ga_vid=1383198307.1375071488&ga_sid=1375076834&ga_hid=1376084322&ga_fc=1&u_tz=180&u_his=1&u_java=1&u_h=768&u_w=1360&u_ah=724&u_aw=1360&u_cd=32&u_nplug=20&u_nmime=152&dff=open%20sans&dfs=12&adx=147&ady=460&biw=1344&bih=620&oid=3&fu=16&ifi=2&dtd=2653&xpc=7H6C42eOGV&p=http%3A//www.tecmint.com&rl_rc=true&adsense_enabled=true&ad_type=text&ui=rc:0&oe=utf8&height=15&width=468&format=fpkc_al_lp&kw_type=radlink&prev_fmts=468x15_0ads_al&rt=ChBR9gHbAAcMrArCY-6JAEtREglMaW51eCBCb3gaCKgTWN-pwhJcKAFSEwj7jdWugNS4AhXHkcIKHQ5lAFo&hl=en&kw0=Linux+CPU&kw1=Socket&kw2=Linux+Box&kw3=IPV6&okw=Linux+Boxhttps://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-2601749019656699&output=html&h=15&slotname=1986283779&w=468&lmt=1375060659&flash=11.8.800&url=http%3A%2F%2Fwww.tecmint.com%2F10-lsof-command-examples-in-linux%2F&dt=1375076834507&bpp=13&bdt=5307&shv=r20130718&cbv=r20130206&saldr=sa&prev_slotnames=8210224606&correlator=1375076834819&frm=20&adk=70527109&ga_vid=1383198307.1375071488&ga_sid=1375076834&ga_hid=1376084322&ga_fc=1&u_tz=180&u_his=1&u_java=1&u_h=768&u_w=1360&u_ah=724&u_aw=1360&u_cd=32&u_nplug=20&u_nmime=152&dff=open%20sans&dfs=12&adx=147&ady=460&biw=1344&bih=620&oid=3&fu=16&ifi=2&dtd=2653&xpc=7H6C42eOGV&p=http%3A//www.tecmint.com&rl_rc=true&adsense_enabled=true&ad_type=text&ui=rc:0&oe=utf8&height=15&width=468&format=fpkc_al_lp&kw_type=radlink&prev_fmts=468x15_0ads_al&rt=ChBR9gHbAAcMqArCY-6JAEtREgZTb2NrZXQaCGt1dLsf7w_xKAFSEwj7jdWugNS4AhXHkcIKHQ5lAFo&hl=en&kw0=Linux+CPU&kw1=Socket&kw2=Linux+Box&kw3=IPV6&okw=Sockethttps://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-2601749019656699&output=html&h=15&slotname=1986283779&w=468&lmt=1375060659&flash=11.8.800&url=http%3A%2F%2Fwww.tecmint.com%2F10-lsof-command-examples-in-linux%2F&dt=1375076834507&bpp=13&bdt=5307&shv=r20130718&cbv=r20130206&saldr=sa&prev_slotnames=8210224606&correlator=1375076834819&frm=20&adk=70527109&ga_vid=1383198307.1375071488&ga_sid=1375076834&ga_hid=1376084322&ga_fc=1&u_tz=180&u_his=1&u_java=1&u_h=768&u_w=1360&u_ah=724&u_aw=1360&u_cd=32&u_nplug=20&u_nmime=152&dff=open%20sans&dfs=12&adx=147&ady=460&biw=1344&bih=620&oid=3&fu=16&ifi=2&dtd=2653&xpc=7H6C42eOGV&p=http%3A//www.tecmint.com&rl_rc=true&adsense_enabled=true&ad_type=text&ui=rc:0&oe=utf8&height=15&width=468&format=fpkc_al_lp&kw_type=radlink&prev_fmts=468x15_0ads_al&rt=ChBR9gHbAAcMkQrCY-6JAEtREglMaW51eCBDUFUaCD-o0cDYp-pRKAFSEwj7jdWugNS4AhXHkcIKHQ5lAFo&hl=en&kw0=Linux+CPU&kw1=Socket&kw2=Linux+Box&kw3=IPV6&okw=Linux+CPUhttp://www.google.com/url?ct=abg&q=https://www.google.com/adsense/support/bin/request.py%3Fcontact%3Dabg_afc%26url%3Dhttp://www.tecmint.com/10-lsof-command-examples-in-linux/%26gl%3DKE%26hl%3Den%26client%3Dca-pub-2601749019656699&usg=AFQjCNE9js3UdHE3q5uItLXJDn504DJKlA
  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    3/13

    7/29/13 10 lsof Command Examples in Linux

    www.tecmint.com/10-lsof-command-examples-in-linux/ 3/13

    init 1 root 2u CHR 1,3 0t0 3764 /dev/null

    init 1 root 3r FIFO 0,8 0t0 8449 pipe

    init 1 root 4w FIFO 0,8 0t0 8449 pipe

    init 1 root 5r DIR 0,10 0 1 inotify

    init 1 root 6r DIR 0,10 0 1 inotify

    init 1 root 7u unix 0xc1513880 0t0 8450 socket

    Sections and its values are self-explanatory. However, well review FD & TYPE columns more precisely.

    FD stands for File descriptor and may seen some of the values as:

    1. cwd current working directory

    2. rtd root directory

    3. txt program text (code and data)

    4. mem memory-mapped file

    Also in FD column numbers like 1u is actual file descriptor and followed by u,r,w of its mode as:

    1. r for read access.2. w for write access.

    3. u for read and write access.

    TYPE of files and its identification.

    1. DIR Directory

    2. REG Regular file

    3. CHR Character special file.

    4. FIFO First In First Out

    2. List User Specific Opened Files

    The below command will display the list of all opened files of usertecmint.

    # lsof -u tecmint

    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

    sshd 1838 tecmint cwd DIR 253,0 4096 2 /

    sshd 1838 tecmint rtd DIR 253,0 4096 2 /

    sshd 1838 tecmint txt REG 253,0 532336 188129 /usr/sbin/sshd

    sshd 1838 tecmint mem REG 253,0 19784 190237 /lib/libdl-2.12.so

  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    4/13

    7/29/13 10 lsof Command Examples in Linux

    www.tecmint.com/10-lsof-command-examples-in-linux/ 4/13

    sshd 1838 tecmint mem REG 253,0 122436 190247 /lib/libselinux.so.1

    sshd 1838 tecmint mem REG 253,0 255968 190256 /lib/libgssapi_krb5.so.2.2

    sshd 1838 tecmint mem REG 253,0 874580 190255 /lib/libkrb5.so.3.3

    3. Find Processe s running on Specific Port

    To find out all the running process of specific port, just use the following command with option -i. The below example will list all running process of port 22.

    # lsof -i TCP:22

    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

    sshd 1471 root 3u IPv4 12683 0t0 TCP *:ssh (LISTEN)

    sshd 1471 root 4u IPv6 12685 0t0 TCP *:ssh (LISTEN)

    4. List Only IPv4 & IPv6 Open Files

    In below example shows only IPv4 and IPv6 network files open with separate commands.

    # lsof -i 4

    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

    rpcbind 1203 rpc 6u IPv4 11326 0t0 UDP *:sunrpc

    rpcbind 1203 rpc 7u IPv4 11330 0t0 UDP *:954

    rpcbind 1203 rpc 8u IPv4 11331 0t0 TCP *:sunrpc (LISTEN)

    avahi-dae 1241 avahi 13u IPv4 11579 0t0 UDP *:mdns

    avahi-dae 1241 avahi 14u IPv4 11580 0t0 UDP *:58600

    # lsof -i 6

    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMErpcbind 1203 rpc 9u IPv6 11333 0t0 UDP *:sunrpc

    rpcbind 1203 rpc 10u IPv6 11335 0t0 UDP *:954

    rpcbind 1203 rpc 11u IPv6 11336 0t0 TCP *:sunrpc (LISTEN)

    rpc.statd 1277 rpcuser 10u IPv6 11858 0t0 UDP *:55800

    rpc.statd 1277 rpcuser 11u IPv6 11862 0t0 TCP *:56428 (LISTEN)

    cupsd 1346 root 6u IPv6 12112 0t0 TCP localhost:ipp (LISTEN)

    5. List Open Files of TCP Port ranges 1-1024

    To list all the running process of open files ofTCP Port ranges from 1-1024.

  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    5/13

    7/29/13 10 lsof Command Examples in Linux

    www.tecmint.com/10-lsof-command-examples-in-linux/ 5/13

    # lsof -i TCP:1-1024

    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

    rpcbind 1203 rpc 11u IPv6 11336 0t0 TCP *:sunrpc (LISTEN)

    cupsd 1346 root 7u IPv4 12113 0t0 TCP localhost:ipp (LISTEN)

    sshd 1471 root 4u IPv6 12685 0t0 TCP *:ssh (LISTEN)

    master 1551 root 13u IPv6 12898 0t0 TCP localhost:smtp (LISTEN)

    sshd 1834 root 3r IPv4 15101 0t0 TCP 192.168.0.2:ssh->192.168.0.1:conclave-cpp (ESTABLISHED)

    sshd 1838 tecmint 3u IPv4 15101 0t0 TCP 192.168.0.2:ssh->192.168.0.1:conclave-cpp (ESTABLISHED)

    sshd 1871 root 3r IPv4 15842 0t0 TCP 192.168.0.2:ssh->192.168.0.1:groove (ESTABLISHED)

    httpd 1918 root 5u IPv6 15991 0t0 TCP *:http (LISTEN)

    httpd 1918 root 7u IPv6 15995 0t0 TCP *:https (LISTEN)

    6. Exclude User with ^ Character

    Here, we have excluded root user. You can exclude a particular user using ^ with command as shown above.

    # lsof -i -u^root

    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

    rpcbind 1203 rpc 6u IPv4 11326 0t0 UDP *:sunrpc

    rpcbind 1203 rpc 7u IPv4 11330 0t0 UDP *:954

    rpcbind 1203 rpc 8u IPv4 11331 0t0 TCP *:sunrpc (LISTEN)

    rpcbind 1203 rpc 9u IPv6 11333 0t0 UDP *:sunrpc

    rpcbind 1203 rpc 10u IPv6 11335 0t0 UDP *:954

    rpcbind 1203 rpc 11u IPv6 11336 0t0 TCP *:sunrpc (LISTEN)

    avahi-dae 1241 avahi 13u IPv4 11579 0t0 UDP *:mdns

    avahi-dae 1241 avahi 14u IPv4 11580 0t0 UDP *:58600

    rpc.statd 1277 rpcuser 5r IPv4 11836 0t0 UDP *:soap-beep

    rpc.statd 1277 rpcuser 8u IPv4 11850 0t0 UDP *:55146

    rpc.statd 1277 rpcuser 9u IPv4 11854 0t0 TCP *:32981 (LISTEN)rpc.statd 1277 rpcuser 10u IPv6 11858 0t0 UDP *:55800

    rpc.statd 1277 rpcuser 11u IPv6 11862 0t0 TCP *:56428 (LISTEN)

    7. Find Out whos Looking What Files and Commands?

    Below example shows usertecmint is using command like ping and /etc directory .

    # lsof -i -u tecmint

    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEbash 1839 tecmint cwd DIR 253,0 12288 15 /etc

  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    6/13

    7/29/13 10 lsof Command Examples in Linux

    www.tecmint.com/10-lsof-command-examples-in-linux/ 6/13

    ping 2525 tecmint cwd DIR 253,0 12288 15 /etc

    8. List all Network Connections

    The following command with option -i shows the list of all network connections LISTENING & ESTABLISHED.

    # lsof -i

    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

    rpcbind 1203 rpc 6u IPv4 11326 0t0 UDP *:sunrpc

    rpcbind 1203 rpc 7u IPv4 11330 0t0 UDP *:954

    rpcbind 1203 rpc 11u IPv6 11336 0t0 TCP *:sunrpc (LISTEN)

    avahi-dae 1241 avahi 13u IPv4 11579 0t0 UDP *:mdns

    avahi-dae 1241 avahi 14u IPv4 11580 0t0 UDP *:58600

    rpc.statd 1277 rpcuser 11u IPv6 11862 0t0 TCP *:56428 (LISTEN)

    cupsd 1346 root 6u IPv6 12112 0t0 TCP localhost:ipp (LISTEN)

    cupsd 1346 root 7u IPv4 12113 0t0 TCP localhost:ipp (LISTEN)

    sshd 1471 root 3u IPv4 12683 0t0 TCP *:ssh (LISTEN)

    master 1551 root 12u IPv4 12896 0t0 TCP localhost:smtp (LISTEN)

    master 1551 root 13u IPv6 12898 0t0 TCP localhost:smtp (LISTEN)

    sshd 1834 root 3r IPv4 15101 0t0 TCP 192.168.0.2:ssh->192.168.0.1:conclave-cpp (ESTABLISHED)

    httpd 1918 root 5u IPv6 15991 0t0 TCP *:http (LISTEN)

    httpd 1918 root 7u IPv6 15995 0t0 TCP *:https (LISTEN)

    clock-app 2362 narad 21u IPv4 22591 0t0 TCP 192.168.0.2:45284->www.gov.com:http (CLOSE_WAIT)

    chrome 2377 narad 61u IPv4 25862 0t0 TCP 192.168.0.2:33358->maa03s04-in-f3.1e100.net:http (ESTABLISHED)

    chrome 2377 narad 80u IPv4 25866 0t0 TCP 192.168.0.2:36405->bom03s01-in-f15.1e100.net:http (ESTABLISHED)

    9. Search by PID

    The below example only shows whose PID is 1 [One].

    # lsof -p 1

    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

    init 1 root cwd DIR 253,0 4096 2 /

    init 1 root rtd DIR 253,0 4096 2 /

    init 1 root txt REG 253,0 145180 147164 /sbin/init

    init 1 root mem REG 253,0 1889704 190149 /lib/libc-2.12.so

    init 1 root mem REG 253,0 142472 189970 /lib/ld-2.12.so

    10. Kill all Activity of Particular User

  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    7/13

    7/29/13 10 lsof Command Examples in Linux

    www.tecmint.com/10-lsof-command-examples-in-linux/ 7/13

    Bio Latest Posts

    Sometimes you may have to kill all the processes for a specific user. Below command will kills all the processes oftecmint user.

    # kill -9 `lsof -t -u tecmint`

    Note: Here, its not possible to give example of all available options, this guide is only to show how lsofcommand can be use. You may refer man page of

    lsofcommand to know more about it. Please share it if you find this article is useful through our comment box below.

    Narad Shrestha

    He has over 10 years of rich IT experience which includes various Linux Distros, FOSS and Networking. Narad always believes sharing

    IT knowledge with others and adopts new technology with ease.

    Linux Services & Free WordPress Setup

    Our post is simply DIY aka Do It Yourself, still you may find difficulties and want us to help you out. We offer wide range ofLinux and Web HostingSolutions at fair minimum rates. Please submit your orders by Clicking Here.

    TweetTweet

    7

    110

    Like

    http://www.tecmint.com/hire-us/http://www.tecmint.com/http://twitter.com/search?q=http%3A%2F%2Fwww.tecmint.com%2F10-lsof-command-examples-in-linux%2Fhttps://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fwww.tecmint.com%2F10-lsof-command-examples-in-linux%2F&text=10%20lsof%20Command%20Examples%20in%20Linux&tw_p=tweetbutton&url=http%3A%2F%2Fwww.tecmint.com%2F10-lsof-command-examples-in-linux%2F&via=tecminthttp://www.tecmint.com/10-lsof-command-examples-in-linux/#ts-fab-latest-posts-belowhttp://www.tecmint.com/10-lsof-command-examples-in-linux/#ts-fab-bio-below
  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    8/13

    Linux Help Root Port Unix Linux

    https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-2601749019656699&output=html&h=15&slotname=4529119776&w=468&lmt=1375060659&flash=11.8.800&url=http%3A%2F%2Fwww.tecmint.com%2F10-lsof-command-examples-in-linux%2F&dt=1375076834527&bpp=11&bdt=5327&shv=r20130718&cbv=r20130206&saldr=sa&prev_slotnames=8210224606%2C1986283779&correlator=1375076834819&frm=20&adk=3490466408&ga_vid=1383198307.1375071488&ga_sid=1375076834&ga_hid=1376084322&ga_fc=1&u_tz=180&u_his=1&u_java=1&u_h=768&u_w=1360&u_ah=724&u_aw=1360&u_cd=32&u_nplug=20&u_nmime=152&dff=open%20sans&dfs=12&adx=147&ady=5198&biw=1344&bih=620&oid=3&fu=16&ifi=3&dtd=5116&xpc=gLm8tjBT8v&p=http%3A//www.tecmint.com&rl_rc=true&adsense_enabled=true&ad_type=text&ui=rc:0&oe=utf8&height=15&width=468&format=fpkc_al_lp&kw_type=radlink&prev_fmts=468x15_0ads_al&rt=ChBR9gHdAA17-ArCjivjAGMcEgpVbml4IExpbnV4Ggj-nNbPzpssySgBMAJSEwirmO2vgNS4AhVwjcIKHWYgADA&hl=en&kw0=Linux+Help&kw1=Root&kw2=Port&kw3=Unix+Linux&okw=Unix+Linuxhttps://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-2601749019656699&output=html&h=15&slotname=4529119776&w=468&lmt=1375060659&flash=11.8.800&url=http%3A%2F%2Fwww.tecmint.com%2F10-lsof-command-examples-in-linux%2F&dt=1375076834527&bpp=11&bdt=5327&shv=r20130718&cbv=r20130206&saldr=sa&prev_slotnames=8210224606%2C1986283779&correlator=1375076834819&frm=20&adk=3490466408&ga_vid=1383198307.1375071488&ga_sid=1375076834&ga_hid=1376084322&ga_fc=1&u_tz=180&u_his=1&u_java=1&u_h=768&u_w=1360&u_ah=724&u_aw=1360&u_cd=32&u_nplug=20&u_nmime=152&dff=open%20sans&dfs=12&adx=147&ady=5198&biw=1344&bih=620&oid=3&fu=16&ifi=3&dtd=5116&xpc=gLm8tjBT8v&p=http%3A//www.tecmint.com&rl_rc=true&adsense_enabled=true&ad_type=text&ui=rc:0&oe=utf8&height=15&width=468&format=fpkc_al_lp&kw_type=radlink&prev_fmts=468x15_0ads_al&rt=ChBR9gHdAA179QrCjivjAGMcEgRQb3J0Ggh5NTYbp4BEnCgBMAJSEwirmO2vgNS4AhVwjcIKHWYgADA&hl=en&kw0=Linux+Help&kw1=Root&kw2=Port&kw3=Unix+Linux&okw=Porthttps://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-2601749019656699&output=html&h=15&slotname=4529119776&w=468&lmt=1375060659&flash=11.8.800&url=http%3A%2F%2Fwww.tecmint.com%2F10-lsof-command-examples-in-linux%2F&dt=1375076834527&bpp=11&bdt=5327&shv=r20130718&cbv=r20130206&saldr=sa&prev_slotnames=8210224606%2C1986283779&correlator=1375076834819&frm=20&adk=3490466408&ga_vid=1383198307.1375071488&ga_sid=1375076834&ga_hid=1376084322&ga_fc=1&u_tz=180&u_his=1&u_java=1&u_h=768&u_w=1360&u_ah=724&u_aw=1360&u_cd=32&u_nplug=20&u_nmime=152&dff=open%20sans&dfs=12&adx=147&ady=5198&biw=1344&bih=620&oid=3&fu=16&ifi=3&dtd=5116&xpc=gLm8tjBT8v&p=http%3A//www.tecmint.com&rl_rc=true&adsense_enabled=true&ad_type=text&ui=rc:0&oe=utf8&height=15&width=468&format=fpkc_al_lp&kw_type=radlink&prev_fmts=468x15_0ads_al&rt=ChBR9gHdAA178grCjivjAGMcEgRSb290Ggg7hJdEV9YadCgBMAJSEwirmO2vgNS4AhVwjcIKHWYgADA&hl=en&kw0=Linux+Help&kw1=Root&kw2=Port&kw3=Unix+Linux&okw=Roothttps://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-2601749019656699&output=html&h=15&slotname=4529119776&w=468&lmt=1375060659&flash=11.8.800&url=http%3A%2F%2Fwww.tecmint.com%2F10-lsof-command-examples-in-linux%2F&dt=1375076834527&bpp=11&bdt=5327&shv=r20130718&cbv=r20130206&saldr=sa&prev_slotnames=8210224606%2C1986283779&correlator=1375076834819&frm=20&adk=3490466408&ga_vid=1383198307.1375071488&ga_sid=1375076834&ga_hid=1376084322&ga_fc=1&u_tz=180&u_his=1&u_java=1&u_h=768&u_w=1360&u_ah=724&u_aw=1360&u_cd=32&u_nplug=20&u_nmime=152&dff=open%20sans&dfs=12&adx=147&ady=5198&biw=1344&bih=620&oid=3&fu=16&ifi=3&dtd=5116&xpc=gLm8tjBT8v&p=http%3A//www.tecmint.com&rl_rc=true&adsense_enabled=true&ad_type=text&ui=rc:0&oe=utf8&height=15&width=468&format=fpkc_al_lp&kw_type=radlink&prev_fmts=468x15_0ads_al&rt=ChBR9gHdAA174wrCjivjAGMcEgpMaW51eCBIZWxwGghknETHXdr59SgBMAJSEwirmO2vgNS4AhVwjcIKHWYgADA&hl=en&kw0=Linux+Help&kw1=Root&kw2=Port&kw3=Unix+Linux&okw=Linux+Helphttp://www.google.com/url?ct=abg&q=https://www.google.com/adsense/support/bin/request.py%3Fcontact%3Dabg_afc%26url%3Dhttp://www.tecmint.com/10-lsof-command-examples-in-linux/%26gl%3DKE%26hl%3Den%26client%3Dca-pub-2601749019656699&usg=AFQjCNE9js3UdHE3q5uItLXJDn504DJKlA
  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    9/13

    7/29/13 10 lsof Command Examples in Linux

    www.tecmint.com/10-lsof-command-examples-in-linux/ 9/13

    Mail (will not be published) (Required)

    Website

    Submit Comment

    Twitter 869 TwitterFacebook 11390 Facebook

    Google+ 281 Google+

    RSS 1431 Subscribers

    Become A TecMint Subscriber to receive latest Updates.

    Enter Your Email Address Signup!

    http://feedburner.google.com/fb/a/mailverify?uri=tecminthttps://plus.google.com/101049688653487009744https://www.facebook.com/pages/Linux-Inside/273296659355468http://twitter.com/tecmint
  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    10/13

    7/29/13 10 lsof Command Examples in Linux

    www.tecmint.com/10-lsof-command-examples-in-linux/ 10/13

    Popular

    LatestComments

    Tags

    Install Apache, MySQL 5.5.32 & PHP 5.5.0 on RHEL/CentOS 6.4/5.9 & Fedora 19-1288 Comments

    Install Cacti (Network Monitoring) on RHEL/CentOS 6.3/5.8 and Fedora 17-1288 Comments

    Wine 1.6 Released Install in RHEL, CentOS and Fedora85 Comments

    CentOS 6.3 Step by Step Installation Guide with Screenshots71 Comments

    http://www.googleadservices.com/pagead/aclk?sa=L&ai=CvM4U4AH2UbPpA6KpigbP84DgC_OpurED89HXrYIBjIuFngsQASCssJ4eUJrGlsL4_____wFglQOgAa_pg_4DyAECqAMByAPRBKoElgFP0ElJPr8rCDeVhLvMKiI4WzGrrbUiHio5w9v4QWkdEyxpBzzjG5BjVq7YL0CYhcw2lLqz2YMVIiMKazloH3Qsl1LLWF5hCt1b-IT5scLFaJW1mBFpi005hTnxRLFf_KbjZZ0pbM3KNGc0qIlylcqqRCghGTGcWEbM-Lr82woahDH7_527c0WuBjdu3nCbtWkBaLAZO_GIBgGgBgKAB7mW_AE&num=1&cid=5GgV1h2EcXIWc6WwejFy83bH&sig=AOD64_3LLK1Y3N7m4rpEUFEULLJYNP2jyw&client=ca-pub-2601749019656699&adurl=http://www.isaca.org/Info/MarketingCertification/CISA_Exam.html%3Fcid%3D1000430%26Appeal%3DGooglehttp://www.tecmint.com/centos-6-3-step-by-step-installation-guide-with-screenshots/#commentshttp://www.tecmint.com/centos-6-3-step-by-step-installation-guide-with-screenshots/http://www.tecmint.com/centos-6-3-step-by-step-installation-guide-with-screenshots/http://www.tecmint.com/install-wine-in-rhel-centos-and-fedora/#commentshttp://www.tecmint.com/install-wine-in-rhel-centos-and-fedora/http://www.tecmint.com/install-wine-in-rhel-centos-and-fedora/http://www.tecmint.com/install-cacti-network-monitoring-on-rhel-centos-6-3-5-8-and-fedora-17-12/#commentshttp://www.tecmint.com/install-cacti-network-monitoring-on-rhel-centos-6-3-5-8-and-fedora-17-12/http://www.tecmint.com/install-cacti-network-monitoring-on-rhel-centos-6-3-5-8-and-fedora-17-12/http://www.tecmint.com/install-apache-mysql-php-on-redhat-centos-fedora/#commentshttp://www.tecmint.com/install-apache-mysql-php-on-redhat-centos-fedora/http://www.tecmint.com/install-apache-mysql-php-on-redhat-centos-fedora/http://www.tecmint.com/10-lsof-command-examples-in-linux/#tag-cloudhttp://www.tecmint.com/10-lsof-command-examples-in-linux/#recent-commentshttp://www.tecmint.com/10-lsof-command-examples-in-linux/#recent-postshttp://www.tecmint.com/10-lsof-command-examples-in-linux/#popular-posts
  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    11/13

    7/29/13 10 lsof Command Examples in Linux

    www.tecmint.com/10-lsof-command-examples-in-linux/ 11/13

    Install Google Chrome 28.0 on RHEL/CentOS 6 and Fedora 19/1544 Comments

    Install Skype 4.1 in Ubuntu 12.10, Xubuntu 12.10 and Linux Mint 14/1343 Comments

    15 Command Line Tools to Monitor Linux Performance41 Comments

    Install VirtualBox 4.2.16 on RHEL/CentOS 6.4/5.9 and Fedora 19-1236 Comments

    CentOS 6.4 Step by Step Installation Guide with Screenshots36 Comments

    Install Linux Malware Detect (LMD) in RHEL, CentOS and Fedora35 Comments

    First Ubuntu Edge Hands-On VIDEO

    http://www.tecmint.com/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora/#commentshttp://www.tecmint.com/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora/http://www.tecmint.com/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora/http://www.tecmint.com/centos-6-4-installation-guide-with-screenshots/#commentshttp://www.tecmint.com/centos-6-4-installation-guide-with-screenshots/http://www.tecmint.com/centos-6-4-installation-guide-with-screenshots/http://www.tecmint.com/install-virtualbox-on-redhat-centos-fedora/#commentshttp://www.tecmint.com/install-virtualbox-on-redhat-centos-fedora/http://www.tecmint.com/install-virtualbox-on-redhat-centos-fedora/http://www.tecmint.com/command-line-tools-to-monitor-linux-performance/#commentshttp://www.tecmint.com/command-line-tools-to-monitor-linux-performance/http://www.tecmint.com/command-line-tools-to-monitor-linux-performance/http://www.tecmint.com/install-skype-4-1-in-ubuntu-xubuntu-linux-mint/#commentshttp://www.tecmint.com/install-skype-4-1-in-ubuntu-xubuntu-linux-mint/http://www.tecmint.com/install-skype-4-1-in-ubuntu-xubuntu-linux-mint/http://www.tecmint.com/install-google-chrome-on-redhat-centos-fedora-linux/#commentshttp://www.tecmint.com/install-google-chrome-on-redhat-centos-fedora-linux/http://www.tecmint.com/install-google-chrome-on-redhat-centos-fedora-linux/
  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    12/13

  • 7/27/2019 10 lsof Command Examples in Linux.pdf

    13/13