LUX 211 - Shell Programming

Review for First Test

The following questions are provided to help you study for the first test. Do not expect to see these exact questions on the test.

  1. What do they mean when they say Linux is free, as in beer, as opposed to free, as in speech? What's the difference?

  2. What are the two classic versions of UNIX?

  3. How is OSX related to Linux? Is it one kind of free, both kinds, or neither kind?

  4. How do you get to a command line in Fedora in our classroom?

  5. How many arguments can we expect to be able to pass to a script, if we call it on a command line?

  6. What are some of the key sequences you might try if you want to stop or end a process running in the foreground?

  7. If you are not logged in as root, what are two methods you might use to send a command with root permissions? What should you expect to need to know to use either one?

  8. What does the man command do? How is it different from the --help command?

  9. What is the delimiting character in Linux with respect to pathnames?

  10. What are two methods to override the special nature of most special characters?

  11. What is the difference between an absolute pathname and a relative pathname? Which kind is the one that uses the tilde?

  12. What do the dot and double dot stand for in pathname notations?

  13. What makes a filename hidden in Linux? What can you do to see hidden files in a directory listing?

  14. How do you tell what kind of file a file is by using an ls command?

  15. Most commands are run with your current set of permissions. How is the passwd command an exception to this concept?

  16. How would you set the permissions for a script you create to mimic the behavior of the passwd command?

  17. What do read, write, and execute permissions mean with regard to a directory?

  18. What are the commands to read and write to the ACL of an object?

  19. How is using an ACL more granular than using just chmod to set the permissions for a file?

  20. In a file system directory, what does a file listing link to?

  21. How are soft links and hard links similar and different?

  22. What is the simplest way to add your present working directory to the PATH variable?

  23. What are the three standard data streams called?

  24. How is the > redirection character different from the | redirection character?

  25. What is a pipeline?

  26. When is a job number created? How can you see list of jobs?

  27. How can you send a process to the background when you call it?

  28. How is an ampersand at the end of a pipeline interpreted?

  29. What are the Boolean meanings of && and ||?

  30. How does Linux represent the concepts of true and false?

  31. Create a truth table for two expressions linked by an AND, then do it for two expressions linked by an OR.

  32. What is the difference between a shell variable and an environment variable? How can you make one into the other?

  33. How can you pass a variable to a script so that only the script knows about it?

  34. How do you display the value of a variable? How do two kinds of quotation marks affect it?

  35. What can you do when you declare a variable that you can't do without that command?

  36. What else can you do with the declare command?