Essential Linux Commands Guide for New Users
For newcomers to Linux server management, mastering fundamental commands is crucial. This guide provides a concise reference for essential commands that streamline server navigation, file management, and interaction.
Content:
-
Navigating the File System:
cd
: Change directory.ls
: List directory contents.pwd
: Print working directory.
-
File and Directory Operations:
mkdir
: Create a directory.touch
: Create an empty file.cp
: Copy files/directories.mv
: Move/rename files/directories.rm
: Remove files/directories.chmod
: Change file permissions.
-
Viewing and Editing Files:
cat
: Display file content.more
orless
: View files page by page.nano
orvim
: Edit text files.
-
File Content Manipulation:
grep
: Search for patterns in files.sed
: Stream editor for text manipulation.awk
: Text processing tool.
-
User and Permissions Management:
useradd
: Create a new user.passwd
: Change user password.usermod
: Modify user properties.sudo
: Execute commands with superuser privileges.chown
: Change file ownership.
-
Process Management:
ps
: List processes.top
orhtop
: Monitor system activity.kill
: Terminate processes.
-
Networking Commands:
ifconfig
orip
: Network configuration.ping
: Test network connectivity.netstat
: Network statistics.ssh
: Secure shell for remote access.
-
Package Management:
- Package installation:
apt
(Debian/Ubuntu) oryum
(RHEL/CentOS).
apt-get
ordnf
: Package management commands.
- Package installation:
-
File Compression and Archives:
tar
: Create and extract tar archives.gzip
orgunzip
: Compress/decompress files.zip
orunzip
: Work with zip archives.
-
System Information:
uname
: Display system information.df
: Disk space usage.free
: Memory usage.
This guide covers essential Linux commands for newcomers to efficiently navigate, manage files, and interact with a Linux server. It's a handy reference for those starting their journey into Linux server management.