sp26-cs544 flashcardsreviewcomputecs544
Deck 04: Compute Deck 04: Compute
Content locked
The catalog is public. Reading this content requires approved access.
Sign in to readDeck 04: Compute
Q1. Port forwarding: if we want to forward port 300 of the loopback device on a VM to port 80 inside a container, how do we run the container?
Q2. What does this do?
Q3. Consider this:
Q4. What is container orchestration, and what is currently a very popular orchestrator?
Q5. often a bunch of server machines are stacked on top of each other in a metal box called a ______ and connected with a network switch
Q6. What does “docker compose” do?
Q7. a large facility containing many racks of computers is called a ______
Q8. a cluster is a ______
Q9. what is a program you can use to run shell programs on another machine?
Q10. what is the technical term for “folder”?
Q11. What Linux command tells you see what directory you’re in?
Q12. What Linux command shows you all the contents of a directory?
Q13. Consider this:
Q14. How do you create a new empty file, file.txt?
Q15. If you have a docker-compose.yml in the current directory, and you want to start running the services defined, what can you do?
Q16. What Linux command do you use to install software on Ubuntu?
Q17. If you want to see the compose containers currently running, what do you do?
Q18. What is a Linux command you can use to download from a URL to a file on your computer?
Q19. If you want to stop running containers for a compose cluster, what can you do?
Q20. What Linux command lets you rename a file?
Q21. If you want to delete all containers for a docker compose cluster, what can you do?
Q22. How can you copy from file A to file B?
Q23. What Linux command lets you copy files between computers?
Q24. What Linux command lets you see everything in a file?
Q25. What Linux commands let you see just the start or end of a file?
Q26. What Linux command creates a new directory?
Q27. What command lets you see entries in the Linux manual?
Q29. How do you run commands as the root user?
Q30. What Linux command lets you change the access permissions on a file?
Q31. Given a program name, how can you find where it is on your computer?
Q32. How can you see an environment variable (for example, PATH)?
Q33. How can you pipe the standard output of A to the standard input of B?
Q34. How do you redirect the standard output of A to file.txt, creating file.txt (or replacing any prior content)?
Q35. How do you redirect the standard output of A to file.txt, creating file.txt (or appending to the end of any prior content)?
Q36. How do you send BOTH standard output and standard error to a file?
Q37. What program counts lines, words, and characters?
Q38. What program filters standard input, writing matching lines to standard output?
Q39. What program recursively finds directories and files?
Q40. How can you run a program asyncronously? (meaning you can type other things on the prompt while waiting for it to finish)
Q41. How can you see running programs and their PIDs? (process IDs)
Q42. How do you kill a process by its PID number?
Q43. How do you kill a process by its name?
Q44. How can you see CPU and memory usage on your machine?
Q45. What Linux command shows you disk utilization?
Q46. What command shows you disk usage by everything in the current directory?
Q47. How can you see most port numbers being used by processes on your machine?
Q48. If a file is continually growing (for example, a program is logging to it), how can you run the “tail” command so that you keep seeing additional content as it is written to the file?
Q49. What keyboard shortcut can you use to run the previous shell command again?
Q50. What keyboard shortcut can you use to kill a program running in a shell
Q51. What keyboard shortcut can you use to indicate you are done typing, and want to exit the shell (or other program taking input)?
Q52. What keyboard shortcut can you use to search over previous shell commands?
Q53. In the shell, if you start typing a few characters and want the shell to complete it, what key should you hit?
Q54. How can you set an environment variable MYVAR to value xyz, in a way that’s visible to programs you will later launch in the shell session?
Q55. If you want to download an image X from DockerHub to your VM, what command do you use?
Q56. How can you see all the Docker images on your VM?
Q57. How can you give a Docker image “a” an additional second name, “b”?
Q58. How can you launch a container from image X?
Q59. How can you see existing containers, including those exited?
Q60. How can you delete a container X?
Q61. How can you delete an image X?
Q62. How can you see Docker’s disk utilization?
Q63. How can you cleanup unnecessary Docker data to free up space?
Q64. How can you see the output (for example prints) for an application running inside container X?
Q65. How do you run a command (lets say “ls”) inside a running container X?
Q66. How do you see resource consumption of running containers?
Q67. How do you get a bash shell inside an existing container X?
Q68. How do you cause a container X to immediately quit?
Q69. How do you use the Dockerfile in the current directory to build an image X?
Q70. What is the difference between “docker rm” and “docker kill”
Q71. In a Dockerfile, how do you specify a base image X?
Q72. In a Dockerfile, how do you execute a command, say “apt update”?
Q73. In a Dockerfile, how do you copy a file X.txt (in the same directory on the VM) to /Y.txt (in the image)?
Q74. In a Dockerfile, why is a single install line preferred?
Q75. How do you cause a container X to quit gracefully?
Q76. What is cron?