Command line Flashcards
What is a CLI?
The command line interface is for the user, or me.
What is a GUI?
Graphic User Interface manipulated with buttons, interfaces for the user.
man
cat
Manual for the commands in the CLI.
Cat displays the content of a chosen file in your terminal. But it is used for joining and combining files.
ls
pwd
ls allows you to see the files in your current directory
pwd prints the current directory you are in
echo
touch
Repeats a string within the terminal but is used to add typed characters within a created fines.
Touch changes the timestamp meaning that if it does not exist it creates an empty file.
mkdir
mv
mkdir makes directories (for making subfolders)
mv moves or rename files in directories (moving files or copying to a different directory)
rm
cp
rm removes a chosen directory or file (-r and -f but -i for interactive)
cp copies the file into the same directory if not specified.
What is Node.js?
An asynchronous event-driven javascript runtime, outside of the browser
What can node.js be used for?
It can run utilities and other programs in the backend as it does not require the browser. Write web, application, desktop programs, mobile apps, any general progr1am that allows you to use node run time but embedded programming does not have enough power.
What is a REPL?
Read Evaluate Print Loop.
Its a system acronym waiting for you to type command and it processes and waits for new command.
Read received program, evaluate, it prints it, then loops waiting for the next command.
What is a computer process?
Set of process run by the computer. An environment to which your program runs CPU memory, and multiple processes running like application which may be an even smaller processes. envirnment of code.
Why should a full stack web dev know that computer processes exist
Too many processes will crash the pc, knowing which are running (dev server, database), so you can kill them.
What is a process object in a node.js program?
Process object is a global object injected during runtime
How do you access the process object in a Node.js program
It is accessed by simply inputing process
What is the data type of process.argv in node.js
It is an array of strings