Linux_Commands.txt

Card Set Information

Author:
Anonymous
ID:
133436
Filename:
Linux_Commands.txt
Updated:
2012-02-07 01:51:17
Tags:
linux
Folders:

Description:
linux commands 1
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user Anonymous on FreezingBlue Flashcards. What would you like to do?


  1. ls -al
    formatted listing with hidden file
  2. cd
    change to home
  3. rm file
    delete file
  4. rm -r dir
    delete dir
  5. rm -f file
    force remove file
  6. rm -rf dir
    force remove dir
  7. cp file1 file2
    copy file1 to file2
  8. ln -s file link
    create symbolic link 'link' to file
  9. touch file
    create or update file
  10. cat > file
    place standard input into file
  11. head file
    output the first 10 lines of file
  12. tail file
    output the last 10 lines of file
  13. tail -f file
    output the contents fo file as it grows, starting with the last 10 lines
  14. ps
    display your currently acrive processes
  15. kill pid
    kill process id pid
  16. killall proc
    kill all processes named proc
  17. bg
    lists stopped or background jobs; resume a stopped job in the background
  18. fg
    brings the most recent job to foreground
  19. fg n
    brings job n to the foreground
  20. chmod 777
    read, write, execute for all {user, group, world}
  21. ssh user@host
    connect to host as user
  22. ssh -p port user@host
    connect to host on port 'port' as user
  23. ssh-copy-id user@host
    add your key to host for user to enable a keyed or passwordless login
  24. grep pattern files
    search for pattern in files
  25. grep -r pattern dir
    search recursively for pattern in dir
  26. command | grep pattern
    search for pattern in the output of command
  27. locate file
    find all instance of file
  28. date
    show the current date and time
  29. cal
    show the current calendar
  30. w
    display who is on line
  31. whoami
    who you are logged in as
  32. finger user
    display information about user
  33. uname -a
    show kernel information
  34. cat /proc/cpuinfo
    cpu info
  35. cat /proc/meminfo
    memory info
  36. df
    show disk usage
  37. du
    show dir space usage
  38. free
    show memory and swap usage
  39. whereis app
    show possible locations of app
  40. which app
    show which app will be run by default
  41. tar cf file.tar files
    create a tar named file.tar containing files
  42. tar xf file.tar
    extract the files from file.tar
  43. tar czf file.tar.gz files
    create a tar with gzip compression
  44. tar xzf file.tar.gz
    extract a tar using gzip
  45. tar cjf file.tar.bz2
    create a tar with bzip2 compression
  46. tar xjf file.tar.bz2
    extract a tar using bzip2
  47. gzip file
    compresses fiel and renames it to file.gz
  48. gzip -d file.gz
    decompresses file.gz back to file
  49. whois domain
    get whois information for domain
  50. dig -x host
    reverse lookup host
  51. wget file
    download file
  52. wget -c file
    continue a stopped download
  53. ./configure
    • make
    • make install
    • install from source
  54. dpkg -i pkg.deb
    install a package (Debian)
  55. rpm -Uvh pkg.rpm
    install a package (RPM)
  56. Ctrl+C
    halts the current command
  57. Ctrl+Z
    stops the current command, resume with fg in the foreground or bg for background
  58. Ctrl+D
    log out of current session, similar to exit
  59. Ctrl+W
    erases one word in the current line
  60. Ctrl+U
    erases the whole line
  61. Ctrl+R
    type to bring up a recent command
  62. !!
    repeats the last command
  63. exit
    log out of the current session

What would you like to do?

Home > Flashcards > Print Preview