The Command Line

Viking Code School

Web Development Basics

  1. What is the command line?
    A way to communicate with your computer by typing in lines of text.
  2. How do you open it on your computer?
    cmd.exe
  3. What is Bash?
    Bash is a Unix shell and command language
  4. How can you navigate into a particular file directory?
    cd
  5. How can you create a directory?
    mkdir
  6. How can you destroy a directory or file?
    rm test.html
  7. How can you rename a directory or file?
    mv test.html index.html
    test.html being the original file name
    index.html being the new file name
  8. Why are file permissions important?
    To keep your data secure.
  9. How do you view hidden files in a directory?
    ls -a
  10. How do you find information about a particular command?
    <command> –help
  11. What is a “Superuser” and how do you execute commands as this user?
    Execute commands as a superuser using ‘sudo’.
    This permits a user to execute a command as another user.
  12. What is Vim?
    A text editor in your Terminal
  13. How do you quit Vim if you get stuck in it?
    :q!
  14. What is the .bash_profile file and what is it used for?
    Bash will check .bash_profile to get more details of the user like user specific environment and startup programs.
  15. What is the $PATH variable?
    It specifies the directories in which executable programs are located on the machine so that they can be started without knowing the whole path to the file in the command line.
  16. Why might you need to add onto your $PATH variable?
    So that you can list multiple programs and start them without knowing the whole path to the executable file in the command line.
  17. What are alias commands?
    Commands you can save to a shortened string.
    Like if you are tired of typing ‘pwd’ all the time, you can set an ‘alias p = pwd’ so now you just need to type ‘p’.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s