Linux Commands Cheat Sheet | Linux Training Academy. Did you know that there are literally hundreds of Linux commands? Even on a bare- bones Linux server install there are easily over 1,0. The interesting thing is that most people only need to use a very small subset of those commands. Below you’ll find a Linux “cheat sheet” that breaks down some of the most commonly used commands by category. To get your own PDF and printable copy, scroll to the bottom of the page. Enjoy! 1 – SYSTEM INFORMATION# Display Linux system information. Display kernel release information. ![]()
![]() I have a headless Ubuntu server. I ran a command on the server (snapraid sync) over SSH from my Mac. The command said it would take about 6 hrs, so I left it over night. Show which version of redhat installed. Show how long the system has been running + load. Show system host name. Display the IP addresses of the host. Show system reboot history. Show the current date and time. Show this month's calendar. ![]() Display who is online. Who you are logged in as. HARDWARE INFORMATION# Display messages in kernel ring buffer. Display CPU information. Display memory information. Display free and used memory ( - h for human readable, - m for MB, - g for GB.). Display PCI devices. Display USB devices. Display DMI/SMBIOS (hardware info) from the BIOS. Show info about disk sda. Perform a read speed test on disk sda. T /dev/sda. # Test for unreadable blocks on disk sda. PERFORMANCE MONITORING AND STATISTICS# Display and manage the top processes. Interactive process viewer (top alternative). Display processor related statistics. Display virtual memory statistics. Display I/O statistics. Display the last 1. Use /var/log/syslog for Debian based systems.). Capture and display all packets on interface eth. Monitor all traffic on port 8. HTTP ). tcpdump - i eth. List all open files on the system. List files opened by user. Display free and used memory ( - h for human readable, - m for MB, - g for GB.). Execute "df - h", showing periodic updates. USER INFORMATION AND MANAGEMENT# Display the user and group ids of your current user. Display the last users who have logged onto the system. Show who is logged into the system. Show who is logged in and what they are doing. Create a group named "test". Create an account named john, with a comment of "John Smith" and create the user's home directory. John Smith" - m john. Delete the john account. Add the john account to the sales group. G sales john. 5 – FILE AND DIRECTORY COMMANDS# List all files in a long listing (detailed) format. Display the present working directory. Create a directory. Remove (delete) file. Remove the directory and its contents recursively. Force removal of file without prompting for confirmation. Forcefully remove directory recursively. Copy file. 1 to file. Copy source_directory recursively to destination. If destination exists, copy source_directory into destination, otherwise create destination with the contents of source_directory. Rename or move file. If file. 2 is an existing directory, move file. Create symbolic link to linkname. Create an empty file or update the access and modification times of file. View the contents of file. Browse through a text file. Display the first 1. Display the last 1. Display the last 1. PROCESS MANAGEMENT# Display your currently running processes. Display all the currently running processes on the system. Display process information for processname. Display and manage the top processes. Interactive process viewer (top alternative). Kill process with process ID of pid. Kill all processes named processname. Start program in the background. Display stopped or background jobs. Brings the most recent background job to foreground. Brings job n to the foreground. FILE PERMISSIONS. PERMISSION EXAMPLE. U G W. rwx rwx rwx chmod 7. NOTE: Use 7. 77 sparingly! U = User. G = Group. W = World. r = Read. NETWORKING# Display all network interfaces and ip address. Display eth. 0 address and details. Query or control network driver and hardware settings. Send ICMP echo request to host. Display whois information for domain. Display DNS information for domain. Reverse lookup of IP_ADDRESS. IP_ADDRESS. # Display DNS ip address for domain. Display the network address of the host name. Display all local ip addresses. Download http: //domain. Display listening tcp and udp ports and corresponding programs. ARCHIVES (TAR FILES)# Create tar named archive. Extract the contents from archive. Create a gzip compressed tar file name archive. Extract a gzip compressed tar file. Create a tar file with bzip. Extract a bzip. 2 compressed tar file. INSTALLING PACKAGES# Search for a package by keyword. Install package. yum install package. Display description and summary information about package. Install package from local file named package. Remove/uninstall package. Install software from source code. SEARCH# Search for pattern in file. Search recursively for pattern in directory. Find files and directories by name. Find files in /home/john that start with "prefix". Find files larger than 1. MB in /home. find /home - size +1. M. 1. 2 – SSH LOGINS# Connect to host as your local username. Connect to host as user. Connect to host using port. FILE TRANSFERS# Secure copy file. Copy *. html files from server to the local /tmp folder. Copy all files and directories recursively from server to the current system's /tmp folder. Synchronize /home to /backups/home. Asphalt 8 Airborne Free Download For Android on this page. Synchronize files/directories between the local and remote system with compression enabled. DISK USAGE# Show free and used space on mounted filesystems. Show free and used inodes on mounted filesystems. Display disks partitions sizes and types. Display disk usage for all files and directories in human readable format. Display total disk usage off the current directory. DIRECTORY NAVIGATION# To go up one level of the directory tree. Change into the parent directory.). Go to the $HOME directory. Change to the /etc directory.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |