From file management to system administration and network configuration, these Linux commands handle a broad range of activities. Comprehending and utilizing these commands is important for effective Linux system administration and operation.
File and Directory Management:
ls
- List files and directories in the current directory.cd
- Change the current working directory.pwd
- Print the current working directory path.mkdir
- Create a new directory.rmdir
- Remove an empty directory.rm
- Remove files or directories.cp
- Copy files or directories.mv
- Move or rename files and directories.touch
- Create an empty file or update the timestamp of an existing file.find
- Search for files and directories.grep
- Search for text patterns in files.cat
- Display the contents of a file.more
- Display file content page by page.less
- Display file content with backward navigation.head
- Display the beginning of a file.tail
- Display the end of a file.ln
- Create hard or symbolic links to files.
File Permissions:
chmod
- Change file permissions.chown
- Change file ownership.chgrp
- Change the group of a file.
User and Group Management:
useradd
- Add a new user.userdel
- Delete a user.passwd
- Change user password.groupadd
- Add a new group.groupdel
- Delete a group.usermod
- Modify user properties.groups
- Display group memberships.id
- Display user and group IDs.
System Information:
uname
- Display system information.hostname
- Display or set the system hostname.df
- Display disk space usage.du
- Display directory space usage.free
- Display system memory usage.
Process Management:
ps
- List running processes.top
- Display real-time system information.kill
- Terminate processes.bg
- Run processes in the background.fg
- Bring background processes to the foreground.nohup
- Run a command immune to hangups.shutdown
- Shut down or restart the system.
File Compression and Archiving:
tar
- Archive files.gzip
- Compress files using gzip.gunzip
- Decompress gzip files.zip
- Create compressed zip archives.unzip
- Extract files from zip archives.
Network Configuration:
ifconfig
- Display and configure network interfaces.ping
- Test network connectivity.ssh
- Securely access remote systems.netstat
- Display network statistics.route
- Manage network routes.
Text Processing:
sed
- Stream editor for text manipulation.awk
- Text processing language.cut
- Remove sections from lines of files.sort
- Sort lines of text files.wc
- Count words, lines, and characters.
Package Management:
apt
- Package handling utility (Debian-based systems).yum
- Package manager (Red Hat-based systems).dpkg
- Debian package manager.rpm
- Red Hat package manager.
File Transfer:
scp
- Securely copy files between systems.
These commands are fundamental for Linux users and system administrators.