Comprehensive Guide to Linux (CentOS 7) Installation, Configuration, and Basic Commands
This article provides a step‑by‑step tutorial on Linux fundamentals, covering the basic concepts of the operating system, how to obtain and install CentOS 7 in a virtual machine, configure networking, perform system installation, use essential command‑line tools, troubleshoot common issues, and apply basic optimizations.
1. Introduction to Linux
Linux is an open‑source, Unix‑like operating system known for its stability, security, and flexibility, widely used on servers and by personal users.
1.1 Common Linux Distributions
Red Hat Enterprise Linux
Fedora
CentOS
Ubuntu
1.2 Obtaining Linux
CentOS can be downloaded directly from the official website or from mirror sites such as Alibaba Cloud:
https://mirrors.aliyun.com/centos/ https://mirrors.aliyun.com/centos-vault/2. Installing CentOS 7 in a Virtual Machine
2.1 Deploy Virtualization Software
The guide uses VMware Workstation; install the software and create a new virtual machine.
2.2 Configure Virtual Machine Settings
Set CPU, memory, disk, and network options (bridge, NAT, or host‑only) according to the desired connectivity.
2.3 Load and Install the CentOS Image
During boot, edit the boot parameters to disable predictable network interface names:
net.ifnames=0 biosdevname=0Proceed through the installer, configure partitions (/boot, swap, /), set the root password, and finish the installation.
3. Basic CentOS 7 Commands
3.1 Command Prompt Formats
[root@host ~]# // superuser prompt
[kang@host ~]$ // normal user prompt3.2 Common Commands
pwd : display current directory pwd
cd : change directory cd /etc
mkdir : create directories mkdir -p /var/log/app
touch : create empty files or update timestamps touch file.txt
ls : list directory contents ls -la
cp : copy files or directories cp source.txt dest.txt
mv : move or rename files mv oldname.txt newname.txt
rm : remove files or directories rm -rf /tmp/old
3.3 System Management
Use shutdown , reboot , halt , or poweroff to control system power state, and systemctl to manage services such as firewalld and network .
4. Troubleshooting and Optimization
4.1 Common Issues
Permission problems – add Everyone rights to the host folder.
Virtual machine shows a black screen – reset Winsock ( netsh winsock reset ) or adjust BIOS settings.
Remote connection failures – verify network configuration, firewall status, and SSH settings.
4.2 System Optimizations
Disable firewalld and SELinux temporarily for easier setup.
Replace default YUM repositories with faster domestic mirrors.
Set the timezone to Asia/Shanghai and enable NTP synchronization with chrony .
Improve SSH login speed by disabling GSSAPI authentication and DNS lookup.
Deepin Linux
Research areas: Windows & Linux platforms, C/C++ backend development, embedded systems and Linux kernel, etc.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.