Linux Basics for LAMP Flashcards
(25 cards)
What is Linux in the context of the LAMP stack?
Linux is the operating system that hosts the Apache, MySQL, and PHP components of the LAMP stack.
Linux provides a stable, open-source environment for running web servers like Apache, which serves WordPress sites. Freelancers use Linux to deploy client applications, while enterprise architects leverage its scalability for high-traffic LAMP environments, aligning with your LAMP stack interest.
What is the Linux file system hierarchy?
The Linux file system hierarchy organizes files in a tree structure starting from the root (/).
Key directories include /var/www (web files) and /etc (configuration). In LAMP, WordPress files reside in /var/www/html. Freelancers navigate this for site setup, while enterprise architects manage file system layouts for multiple applications.
What is the ls command in Linux?
The ls command lists directory contents, like ls -l for detailed output.
Used to view files in /var/www/html for WordPress. Freelancers check web directories, while enterprise architects use ls to verify file presence in automated deployments, supporting your server management needs.
What is the cd command in Linux?
The cd command changes directories, like cd /var/www/html.
Navigates to WordPress or Apache directories in LAMP. Freelancers access project folders, while enterprise architects use cd in scripts for server maintenance, essential for your LAMP integration goals.
What is the pwd command in Linux?
The pwd command prints the current working directory, like /var/www/html.
Confirms your location when managing WordPress files. Freelancers verify directories, while enterprise architects include pwd in automation to ensure correct paths.
What is the mkdir command in Linux?
The mkdir command creates directories, like mkdir myapp.
Creates folders for WordPress sites or logs in /var/www. Freelancers set up project structures, while enterprise architects automate directory creation for scalable deployments.
What is the rm command in Linux?
The rm command removes files or directories, like rm -r folder.
Deletes old WordPress files or logs. Freelancers use it cautiously for cleanup, while enterprise architects script safe removals to avoid data loss in LAMP environments.
What is the cp command in Linux?
The cp command copies files or directories, like cp file1 file2.
Copies WordPress themes or backups. Freelancers duplicate files for clients, while enterprise architects automate backups with cp for redundancy, aligning with your security interests.
What is the mv command in Linux?
The mv command moves or renames files, like mv file1 /newpath.
Relocates WordPress files or renames configurations. Freelancers reorganize site files, while enterprise architects use mv in deployment scripts for efficient file management.
What are Linux file permissions?
File permissions control access (read, write, execute) for users, groups, and others.
In LAMP, permissions like 755 for directories ensure Apache can serve WordPress files. Freelancers set permissions, while enterprise architects enforce strict access for security, as in your WordPress Security deck.
What is the chmod command in Linux?
The chmod command changes file permissions, like chmod 644 file.php.
Sets 644 for WordPress PHP files or 755 for directories. Freelancers secure client sites, while enterprise architects automate chmod for consistent permissions.
What is the chown command in Linux?
The chown command changes file ownership, like chown www-data:www-data file.
Assigns WordPress files to Apache’s user (www-data). Freelancers configure ownership, while enterprise architects ensure correct ownership for multi-user systems.
What is the sudo command in Linux?
The sudo command runs commands as a superuser, like sudo apt update.
Required for installing LAMP components or editing /etc. Freelancers use sudo for server setup, while enterprise architects restrict sudo access for security.
What is the apt package manager in Linux?
apt manages software packages on Debian-based systems, like apt install apache2.
Installs Apache, MySQL, or PHP for LAMP. Freelancers set up servers, while enterprise architects automate apt updates for consistent environments.
What is the apt update command?
apt update refreshes package lists, like sudo apt update.
Ensures the latest LAMP component versions. Freelancers run it before installs, while enterprise architects schedule updates for system maintenance.
What is the apt upgrade command?
apt upgrade installs updated packages, like sudo apt upgrade.
Keeps Apache or PHP secure and current. Freelancers update client servers, while enterprise architects manage upgrades to minimize downtime, per your performance goals.
What is the service command in Linux?
The service command manages system services, like sudo service apache2 restart.
Restarts Apache or MySQL in LAMP. Freelancers control services for WordPress, while enterprise architects automate service management for reliability.
What is the ps command in Linux?
The ps command lists running processes, like ps aux | grep apache.
Checks if Apache or MySQL is running. Freelancers monitor server health, while enterprise architects integrate ps with monitoring tools for LAMP systems.
What is the top command in Linux?
The top command displays real-time system resource usage, like CPU and memory.
Monitors LAMP server performance. Freelancers diagnose slowdowns, while enterprise architects use top for resource optimization, aligning with your performance deck.
What is SSH in Linux?
SSH (Secure Shell) provides secure remote access to Linux servers, like ssh user@server.
Accesses LAMP servers for WordPress management. Freelancers configure SSH for clients, while enterprise architects secure SSH with key-based authentication.
What is the /etc directory in Linux?
The /etc directory stores system configuration files, like /etc/apache2.
Contains Apache and PHP configs for LAMP. Freelancers edit configs, while enterprise architects automate configuration management for consistency.
What is the nano editor in Linux?
nano is a text editor for editing files, like nano /etc/apache2/apache2.conf.
Edits Apache or WordPress configs. Freelancers use nano for quick changes, while enterprise architects prefer editors like vim for scripting.
What is the tail command in Linux?
The tail command displays the end of a file, like tail -f /var/log/apache2/error.log.
Monitors Apache or WordPress logs. Freelancers debug errors, while enterprise architects pipe logs to monitoring systems, per your debugging deck.
What is cron in Linux?
cron schedules recurring tasks, like crontab -e to add a job.
Runs WordPress backups or PHP scripts. Freelancers automate client tasks, while enterprise architects use cron for system maintenance, supporting your deployment goals.