List IP addresses and network interfaces: Assign an IP address to interface eth0: Display IP addresses of all network interfaces with: See active (listening) ports with the netstat command: Show tcp and udp ports and their programs: Display more information about a domain: Show DNS information about a domain using the dig command: Do a reverse lookup on domain: Do reverse lookup of an IP address: Perform an IP lookup for a domain: Show the local IP …
Start reading NetworkBlog
Chown command in Linux changes file and directory ownership. Assign read, write, and execute permission to everyone: chmod 777 [file_name]Give read, write, and execute permission to owner, and read and execute permission to group and others: chmod 755 [file_name]Assign full permission to owner, and read and write permission to group and others: chmod 766 [file_name]Change …
Start reading File PermissionShow system information: uname -rSee kernel release information: uname -aDisplay how long the system has been running, including load average: uptimeSee system hostname: hostnameShow the IP address of the system: hostname -iList system reboot history: last rebootSee current time and date: dateQuery and change the system clock with: timedatectlShow current calendar (month and day): calList …
Start reading System InformationList all installed packages with yum: yum list installedFind a package by a related keyword: yum search [keyword]Show package information and summary: yum info [package_name]Install a package using the YUM package manager: yum install [package_name.rpm]Install a package using the DNF package manager: dnf install [package_name.rpm]Install a package using the APT package manager: apt-get install [package_name]Install …
Start reading Package InstallationMove up one level in the directory tree structure: cd ..Change directory to $HOME: cdChange location to a specified directory: cd /chosen/directoryFile CompressionArchive an existing file: tar cf [compressed_file.tar] [file_name]Extract an archived file: tar xf [compressed_file.tar]Create a gzip compressed tar file by running: tar czf [compressed_file.tar.gz]Compress a file with the .gz extension: gzip [file_name]File TransferCopy …
Start reading Directory NavigationSearch for a specific pattern in a file with: grep [pattern] [file_name]Recursively search for a pattern in a directory: grep -r [pattern] [directory_name]Find all files and directories related to a particular name: locate [name]List names that begin with a specified character [a] in a specified location [/folder/location] by using the find command: find [/folder/location] -name …
Start reading SearchingHardware InformationShow bootup messages: dmesgSee CPU information: cat /proc/cpuinfoDisplay free and used memory with: free -hList hardware configuration information: lshwSee information about block devices: lsblkShow PCI devices in a tree-like diagram: lspci -tvDisplay USB devices in a tree-like diagram: lsusb -tvShow hardware information from the BIOS: dmidecodeDisplay disk data information: hdparm -i /dev/diskConduct a read-speed …
Start reading Linux Commands ListCommand Description i Insert at cursor (goes into insert mode) a Write after cursor (goes into insert mode) A Write at the end of line (goes into insert mode) ESC Terminate insert mode u Undo last change U Undo all changes to the entire line o Open a new line (goes into insert mode) dd …
Start reading VI Editing CommandsCommand Description bg To send a process to the background fg To run a stopped process in the foreground top Details on all Active Processes ps Give the status of processes running for a user ps PID Gives the status of a particular process pidof Gives the Process ID (PID) of a process kill PID …
Start reading Process commandCommand Description SSH username@ip-address or hostname login into a remote Linux machine using SSH Ping hostname=”” or =”” To ping and Analyzing network and host connections dir Display files in the current directory of a remote computer cd “dirname” change directory to “dirname” on a remote computer put file upload ‘file’ from local to remote …
Start reading Networking command