Servers Flashcards
Why is it good to know how to use vim?
Bc it is on every server. You can’t always use VSCode to edit a file, but you can always use vim.
What does a server do?
Anything can be a server (e.g. laptop, phone) as long as it is responding to requests and serving content.
Servers are usually custom-built machines for specifically serving files, and have different specs, like error-correcting memory and a lot of cores, from 40-60. Waaay faster than any computer.
What are data centres?
Places that have a lot of servers. Clean, cold and very, very secure. They consume massive amounts of power, like as much as cities. Google/FB/Amazon have some of their own data centres built next to renewable sources.
What is the cloud?
The cloud lets me run the same application in different parts of the world to reduce lag for users.
Allows elastic computing (scaling server size depending on traffic).
What is elastic computing?
If you use a data centre or the cloud, you can scale the size of your servers depending on traffic, rather than being stuck with a fixed set of hardware that you have to maintain regardless. i.e. if you generally have less traffic over Christmas, you can scale down for that period).
This kind of on-demand capacity is a relatively new idea in computing.
What is a VPS?
Virtual Private Server. It’s when you rent part of a server, e.g. from digitalocean or aws.
What are the two basic parts of a linux OS? How does it differ to Windows?
Kernel: the layer that talks to the actual hardware (CPU, scheduling, threading).
Utilities: tiny little applications that generally do one thing. (ways of interacting with the kernel or other applications on the system).
Bc the utilities are separate from the kernel, you can update them without updating the whole system. With windows, bc they are all baked in together, if you want to update a utility, you have to update the whole system.
When buying a VPS, what is the LTS version?
Long-term support. Using this means you don’t have access to the newest functionalities (like newest async await for example), but it does mean that the way things are handled will not change, providing you with a stable environment for production.
What are the two main basic ways to get access to a server? (Authentication)
Username/Password and SSH keys.
What is SSH?
Secure Socket Shell.
It is a very, very large key that is as of now unbreakable, so it’s a much more secure way to log into your server. They are the strongest authentication method that you can get right now.
What is an SSH key pair? How does it work?
Public/Private key.
The private key is saved on your device and the public key is on the server. All communication between your device and the server is encrypted with the private key. The communication is sent through a tunnel/pipe, and while it is in the pipe, communication is unbreakable.
The private SSH key never leaves the device, so it cannot be intercepted.
Using bash, how would you list only the files in a folder that contain ‘intro’?
ls | grep info