Linux Command Cheat Sheet

29/12/2020
Chưa phân loại
Hello everyone, here is a list of all the linux commands I can think of and can be helpful for your usage. Download Linux Command Cheat Sheet PDF Version here.

File Administration

  • ls [options] [arguments] : List the files in a particular directory or present directory if used without options or arguments
  • cd [options] directory: change the present directory
  • ln [options] original file link file : Create links b/w files or b/w directories
  • ln [options] original file : Create a link to the original file in the present directory
  • mkdir [options] directory : Make a directory
  • mv [options] source destination : Move and/or rename files and directories
  • pwd [option] : prints the current working directory
  • rm [options] file : Delete files or directories
  • rmdir [options] directory : Remove empty directories
  • tar [options] archivename [file(s)] : archive or extract files
  • chgrp [options] group files: Change group ownership of one or more files & directories
  • chmod [options]mode files: Change access permissions of one or more files & directories
  • chown[options] new owner files : Change the ownership of one or more files & directories
  • cp [options] source destination : Copy files and directories
  • find [start-point] [search-criteria] [search-term] : find files
  • gzip [options] filename : compress or expand files
  • cat [options] [filenames] [-] [filenames] : Display, combine or create new files.
  • cut [options] file : Cut out sections of each line of a file or files
  • diff [options] from-file to-file : Display the differences between two files
  • grep [options] pattern [file] : Search text and match patterns
  • head [options] filename(s) : List the first part of a specified file
  • less [options] filename : Display text files
  • more [options] filename : Display a text file
  • tail [options] filename(s) : List the last part of a specified file

Processes

  • crontab [-u user] [-l | -r | -e] : Schedule a task to run at a particular time or interval
  • kill [options] PID(s) : sends a signal to terminate a process or processes by PID
  • killall [options] command name : sends a signal to terminate a processes by name
  • ps [options] : displays a snapshot of the current processes
  • top [options] : display system and process information in real time

Network

  • ifconfig [arguments] interface [options] : Configure a network interface
  • ifconfig [arguments] [interface] : View network interface details
  • ip [options] object sub-command [parameters] : network configuration tool
  • netstat [options] : network connection monitoring tool
  • ping [options] remote server : checks the network connection to a remote server.
  • curl [options] [URL] : download or upload files to remote servers.
  • host [options] server : checks a computers IP address from its host-name or the reverse
  • scp[options]user1@sourcehost:directory/filenameuser2@destinationhost:directory/filename : securely copy files between computers
  • sftp [options] [user@] hostname [:directory] : interactively copy files between computers securely
  • ssh [options] [login name] server : securely access a remote computer.
  • traceroute [options] host-name : trace the route packets take to network host
  • wget [options] [URL] : download or upload files from the web non-interactivly.

Miscellaneous

  • apt-get install package-name : Install a package
  • apt-get remove package-name : Un-install a package
  • apt-get update : Update the database of available packages
  • apt-get upgrade : Upgrade the packages on the system
  • echo [options] [string(s)] : display text on the screen.
  • groupadd [options] group : add a group account
  • clear : clears the terminal screen.
  • man [options] command : display the reference manual for a command.
  • modprobe [options] modulename : Load or remove a Linux kernel module
  • passwd [options] username : change the user password
  • shutdown [options] [time] [message] : shut down or restart a system.
  • su [options] [username] : switch to another user.
  • sudo [options] command : Execute a command as the superuser
  • usermod [options] username : Modify a users account configuration
  • useradd [options] username : Add a user account
  • who [options] : report the users logged onto the system.
  • whoami [options] : report the current user.

File Systems

  • fdisk [options] [device] : manipulate partition tables.
  • mkfs [options] device : format a partition with a file system
  • mount [options] type device directory : Mount storage onto the file system
  • umount [options] device and/or directory : Unmount storage from the file system

System Information

  • date [options] +format : display or set the date / time
  • du [options] file : display the amount space used in files and directories
  • free [options] : displays information about free and used memory on the system
  • df [options] file : display the amount of free space on filesystems.
ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Hướng dẫn cài đặt agent của checkmk trên centos 7

Giám sát các máy đang chạy hề điều hành linux bằng check_mk như thế nào? Hướng dẫn này tôi sẽ...
30/12/2020

How to Use GRUB Rescue on Ubuntu 18.04 LTS

GRUB is a bootloader software. It is widely used as the default bootloader for Linux. Although GRUB is used widely in Linux,...
28/12/2020

CentOS Install AWS CLI

Amazon is one of the most popular service providers as far as cloud platforms. Using the service, any business can share...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Dịch Vụ Xây Dựng Hệ Thống Peering Với Internet Exchange (IXP)
04/04/2025

Dịch Vụ Triển Khai VPN Site-to-Site & Remote Access
04/04/2025

Dịch Vụ Thiết Lập Hệ Thống Tường Lửa (Firewall)
04/04/2025

Dịch Vụ Triển Khai Hệ Thống Ảo Hóa & Cloud
04/04/2025

Dịch Vụ Triển Khai Hệ Thống Ceph
04/04/2025