Sobes.tech
Junior

What Linux administration commands do you know?

sobes.tech AI

Answer from AI

  • cd - change directory, navigation through the file system.
  • ls - list directory contents, viewing the contents of a directory.
  • pwd - print working directory, displaying the current directory.
  • mkdir - make directory, creating a new directory.
  • rm - remove, deleting files and directories.
  • cp - copy, copying files and directories.
  • mv - move, relocating or renaming files and directories.
  • touch - create an empty file or update the timestamp.
  • cat - output the contents of a file to standard output.
  • grep - search within files using regular expressions.
  • chmod - change permissions of files and directories.
  • chown - change the owner of a file or directory.
  • ps - display a list of running processes.
  • top - monitor processes and system resource usage in real-time.
  • kill - send a signal to a process (usually to terminate it).
  • df - display disk space usage information.
  • du - display the size of files and directories.
  • ssh - Secure Shell, remote connection to a server.
  • scp - Secure Copy, secure copying of files between hosts.
  • sudo - execute a command with superuser privileges.
  • apt (Debian/Ubuntu) / yum (CentOS/RHEL) - package management.
  • systemctl - manage services (on systems with systemd).
  • tar - create and extract archives.
  • gzip/gunzip - compress/extract files.
  • ping - check network node availability.
  • traceroute - trace the route of packets to a network node.
  • netstat - display network connections, routing tables, and statistics.
  • ifconfig (deprecated) / ip - configure and display network interfaces.
  • crontab - manage scheduled tasks (cron jobs).
  • htop - interactive process monitor (enhanced version of top).
  • nano / vim / ed - text editors.

Examples of usage:

# Change to the user's home directory
cd ~
# List contents of the current directory in detailed format, including hidden files
ls -la
# Create a new directory "my_project"
mkdir my_project
# Delete the file "temp.log" without confirmation
rm -f temp.log
# Search for the string "error" in the file "application.log"
grep "error" application.log
# Change permissions of the file "script.sh" to make it executable by the owner
chmod u+x script.sh
# Run the command to update the package list with superuser privileges
sudo apt update