User contributions for Ardika Sulistija
A user with 285 edits. Account created on 13 May 2024.
27 August 2024
- 00:1900:19, 27 August 2024 diff hist +18 N Gdisk Created page with "Under construction" current
- 00:1800:18, 27 August 2024 diff hist +2,271 N Gcc Created page with "====How to install gcc on RHEL6==== ---- Tested on RHEL6.9: mkdir /mnt/rhel6dvd mount /dev/sr0 /mnt/rhel6dvd # ensure the DVD Iso is connected to the VM vi /etc/yum.repos.d/dvd.repo [dvd-Server] mediaid=1409145026.642170 name=RHEL 6 Server DVD baseurl=file:///mnt/rhel6dvd/Server gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release enabled=1 gpgcheck=1 yum -y install gcc ====How to install gcc manually on RHEL6.10==== ---- <b>Note:</b> This works..." current
- 00:1800:18, 27 August 2024 diff hist +15,171 N GRUB Created page with " GRUB -- Grand Unified Bootloader; executes the Kernel. * GRUB goes through two stages. * After the two stages, the kernel and initrd is loaded into memory. * Config files: ** <b>GRUB 1</b> (old vers) <b>/etc/grub.conf</b> -> <b>/boot/grub/grub.conf</b> ** <b>GRUB 2</b> (New Grub) <b>/etc/grub2.cfg</b> -> <b>/boot/grub2/grub.cfg</b> *** GRUB 2 reads its configuration from the <b>/boot/grub2/grub.cfg</b> file on traditional <b>BIOS-based</b> machines and from the <b>/boot..." current
- 00:1700:17, 27 August 2024 diff hist +4,665 N Fstab Created page with "ADD NOTES: https://xan.manning.io/2017/05/29/best-practice-for-mounting-an-lvm-logical-volume-with-etc-fstab.html <b>/etc/fstab</b> - static information about the filesystems (aka file system table) The file fstab contains descriptive information about the filesystems the system can mount. <b>fstab</b> is only read by programs, and not written; It is the duty of the system administrator to properly create and maintain this file. The order of records in fstab is..." current
- 00:1700:17, 27 August 2024 diff hist +363 N Fsck Created page with "UNDER CONSTRUCTION https://www.tecmint.com/fsck-repair-file-system-errors-in-linux/ BE SURE TO UMOUNT THE FILESYSTEM BEFORE RUNNING FSCK!!!! e2fsck - ext2 I believe. But fsck will detect it If the root filesystem is getting mounted as "Read-only" (ro) then you will need to detach it, attach it to another instance as a secondary volume, and run <b>fsck</b>." current
- 00:1600:16, 27 August 2024 diff hist +3,042 N FreeBSD Created page with "Network config file location: * /etc/rc.conf * Default EC2 instance: # cat /etc/rc.conf ec2_configinit_enable=YES ec2_fetchkey_enable=YES ec2_ephemeralswap_enable=YES ec2_loghostkey_enable=YES firstboot_freebsd_update_enable=YES firstboot_pkgs_enable=YES growfs_enable="YES" ifconfig_DEFAULT="SYNCDHCP" sshd_enable="YES" firstboot_pkgs_list="awscli" https://www.serverlab.ca/tutorials/unix/how-to-set-static-ip-and-dhcp-in-freebsd/ ---- LSBLK equivalent in Fr..." current
- 00:1600:16, 27 August 2024 diff hist +4,360 N Free Created page with "<b>free</b> - Display amount of free and used memory in the system, as well as the buffer used by the kernel, and the used physical and swap memory. It displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered by parsing <b>/proc/meminfo</b>. * <b>total</b> - Total installed memory (MemTotal and SwapTotal in /proc/meminfo) * <b>used</b> - Used memory (calculat..." current
- 00:1600:16, 27 August 2024 diff hist +286 N Firewalls Created page with "There are different types of firewalls. Let's review: Types of firewalls: * <b>iptables</b> - Till RHEL6/CentOS6, and similar. * <b>netfilter</b> - kernel module * <b>ufw</b> - Ubuntu * <b>pf</b> - BSD * <b>firewalld</b> - RHEL7+" current
- 00:1500:15, 27 August 2024 diff hist +1,829 N Firewalld Created page with "https://www.tecmint.com/start-stop-disable-enable-firewalld-iptables-firewall/ Good article: https://www.linode.com/docs/guides/introduction-to-firewalld-on-centos/ <b>firewalld</b> - A wrapper for iptables to allow easier management of iptables rules. Is <b>not</b> an iptables replacement. It's a firewall service <u>daemon</u> that provides a dynamic customizable host-based firewall with a D-Bus interface. It enables creating, changing, and deleting the rules without..." current
- 00:1500:15, 27 August 2024 diff hist +2,134 N Find Created page with "<B>find</B> - Search for files in a directory hierarchy. ---- Examples: find /dir -name "filename" # Searches up the "dir" directory with "filename" find /dir -iname "filename" # ^^^ does the same but insensitive. find /dir -emtpy # Searches up all the empty files in "dir" directory. Displays the 5 LARGEST files in the directory THAT YOU ARE IN. (hence the dot (.) find . -type f -exec ls -s {} \; | sprt -n -r | head -5 Displays the..." current
- 00:1500:15, 27 August 2024 diff hist +6,933 N Fdisk & Gdisk Created page with "If you do not know whether the VM uses MBR or GPT partitions, log into the VM as root and enter one of the following commands. * **fdisk -l /dev/xvda** - For MBR partitions, the operating system will be shown in the Disklabel type field. # fdisk -l /dev/xvda Welcome to fdisk (util-linux 2.27.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/xvd..." current
- 00:1400:14, 27 August 2024 diff hist +1,336 N Fail2ban Created page with "<b>Fail2ban</b> - a set of server and client programs to limit brute force authentication attempts. ====How to set up fail2ban for ssh:==== ---- 1) Install fail2ban</br> 2) Create a new file by copying jail.conf to a new file called jail.local ‘cp jail.conf jail.local’ 3) Configure jail.local: <b>Bantime</b>; number of seconds that a host is banned. <b>Findtime</b>; the max amount of time to complete the login process. If they don’t do it, they will be banned..." current
- 00:1400:14, 27 August 2024 diff hist +186 N FIPS Created page with "====How to check if FIPS is enabled==== ---- Check that FIPS mode is enabled: $ fips-mode-setup --check FIPS mode is enabled. ====Kernel Parameter for enabling FIPS==== ---- fips=1"
- 00:1400:14, 27 August 2024 diff hist +2,384 N Excel Created page with "====Sort a Table by IP Address==== ---- #. Create a new column to the left of the <b>IP Address</b> column. Let's call it the <b>Sorted</b> column #. Copy the IP addresses from the <b>IP Address column</b> to the new column (<b>Sorted</b>) #. In the <b>Sorted</b> column, use the "find and replace" feature to remove the first three octets so that you are left with the last octet only ##. For example, it the IP addresses are "10.240.5.4", then find "10.240.5." and replace..." current
- 00:1300:13, 27 August 2024 diff hist +2,169 N Ethtool Created page with "<b>ethtool</b> - query or control network driver and hardware settings. Use this command to verify that your link is up (the Ethernet is physically connected to the network). https://www.poftut.com/linux-ethtool-tutorial-usage-examples/ ====Is it plugged in?==== ---- On a physical server, with physical cables connected to them, it would probably look like: $ sudo ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10bas..." current
- 00:1300:13, 27 August 2024 diff hist +1,388 N Ephemeral Port Created page with " What is an <B>ephemeral port</B>? It is a port that is only used for short period. It is typically used by a client when it connects to a server. The range is usually 49152 through 65535 but does vary. The client end of a connection typically uses a high port number allocated for short term use. ---- Other definitions:</br> [https://www.techopedia.com/definition/19157/ephemeral-port Techopedia:]</br> In client-server processes that use Transmission Control Protoco..." current
- 00:1200:12, 27 August 2024 diff hist +5,431 N Environment Variables Created page with "====How to set environment variables in Linux? (<b>proxy</b> examples)==== ---- Check current proxy configuration status (https_proxy/https_proxy)/ This variable will show if there is a proxy server configured on the system: # echo $http_proxy # echo $https_proxy Set up proxy without username and password # export http_proxy=http://SERVER:PORT/ # export https_proxy=http://SERVER:PORT/ # export no_proxy=localhost,127.0.0.1,169.254.169.254,.amazonaws.com..." current
- 00:1200:12, 27 August 2024 diff hist +766 N Entropy Created page with "Reference: https://major.io/2007/07/01/check-available-entropy-in-linux/ Check available entropy in Linux Sometimes servers just have the weirdest SSL problems ever. In some of these situations, the entropy has been drained. Entropy is the measure of the random numbers available from /dev/urandom, and if you run out, you can’t make SSL connections. To check the status of your server’s entropy, just run the following: # cat /proc/sys/kernel/random/entropy_avail If i..." current
- 00:1200:12, 27 August 2024 diff hist +6,553 N ElastiCache Created page with "====How to install Redis-cli==== ---- How to install Redis-cli on Amazon Linux 2: $ sudo yum -y install openssl-devel gcc $ wget http://download.redis.io/redis-stable.tar.gz $ tar xvzf redis-stable.tar.gz $ cd redis-stable $ make distclean $ make redis-cli BUILD_TLS=yes $ sudo install -m 755 src/redis-cli /usr/local/bin/ ==== Is there downtime when changing node type? (scaling up)==== ---- Reference:</br> [1] Cluster mode disabled </br> https://docs.aws.amazon..." current
- 00:1000:10, 27 August 2024 diff hist +4,424 N EFS Created page with "<b>EFS</b> - Elastic Filesystem ====Other methods besides DD==== ---- * How can I copy data to and from Amazon EFS in parallel to maximize performance on my EC2 instance?</br> https://aws.amazon.com/premiumsupport/knowledge-center/efs-copy-data-in-parallel/ DD is not parallel, so there are other methods to create files much quicker than DD. Below is a process on how you can do so: 1) Create ten thousand small files in your local storage on your instance. $ mkdir /t..." current
- 00:1000:10, 27 August 2024 diff hist +59,529 N ECS Created page with "<b>ECS</b> - Amazon Elastic Container Service https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html Related Topics: <b>Docker</b>, <b>Docker Troubleshooting and CLI</b>, <b>ECR</b> Really good blog post about how ECS manages CPU and memory resources: https://aws.amazon.com/blogs/containers/how-amazon-ecs-manages-cpu-and-memory-resources/ ====ECS Components==== ---- =====<u><b>Cluster</b></u>==..." current
- 00:1000:10, 27 August 2024 diff hist +6,756 N ECR Created page with "* <b>Docker</b> * <b>Docker Troubleshooting and CLI</b> ---- <b>ECR</b> - Amazon Elastic Container Registry * A fully managed private docker container registry service that makes it easy to store, pull, and push docker images securely. * ECR automatically encrypts images at rest using S3 server-side encryption and transfers your container images over HTTPS. * ECR uses AWS S3 service in the back-end to host images in a Hig..." current
- 00:0900:09, 27 August 2024 diff hist +14,227 N EC2 Created page with "the default user name for the AMI that you used to launch your instance: * For <b>Amazon Linux 2</b> or the <b>Amazon Linux</b> AMI, the user name is <b>ec2-user</b>. * For a <b>CentOS</b> AMI, the user name is <b>centos</b>. * For a <b>Debian</b> AMI, the user name is <b>admin</b>. * For a <b>Fedora</b> AMI, the user name is <b>ec2-user</b> or <b>fedora</b>. * For a <b>RHEL</b> AMI, the user name is <b>ec2-user</b> or <b>root</b>. * For a <b>SUSE</b> AMI, the user..." current
- 00:0900:09, 27 August 2024 diff hist +3,693 N EBS Created page with " ====How to list and delete EBS Snapshots in Bulk==== ---- How to list all EBS snapshots: https://aws.amazon.com/premiumsupport/knowledge-center/ebs-volume-snapshot-ec2-instance/ How to delete EBS snapshots in bulk: * This deletes all EBS snapshots created before 2020-07-28: $ for i in $(aws ec2 describe-snapshots --owner-ids self --query 'Snapshots[?StartTime<=`2020-07-28`].SnapshotId' --output text); do aws ec2 delete-snapshot --snapshot-id $i; sleep 5; done; * An..." current
21 August 2024
- 14:4914:49, 21 August 2024 diff hist +3,527 N Du Created page with " <b>du</b> - estimate file space usage. Summarizes disk usage of each FILE, recursively for directories. The two commands (df & du) reports their figures from different sources, and changes to the filesystems are not always considered in the same way. The disk free command (abbreviated to "df") is the standard Linux/Unix command used to display available disk space for the file systems. The "df" command uses the statvfs() system call and asks the file system for the c..." current
- 14:4914:49, 21 August 2024 diff hist +2,207 N Dracut Created page with "In Red Hat Enterprise Linux (RHEL), dracut typically runs automatically when you install a new kernel. During the kernel installation process, dracut is invoked to create a new initial RAM filesystem (initramfs) image. This initramfs image is necessary for the system to boot with the new kernel, as it contains the drivers and modules required to mount the root filesystem and start the boot process. The new initramfs image is usually placed in the /boot directory alongsi..." current
- 14:4914:49, 21 August 2024 diff hist +224 N Dos2unix Created page with " <B>dos2unix</b> - DOS/Mac to Unix and vice versa text file format converter. ----- Install: yum -y install dos2unix apt-get install dos2unix Convert Dos -> Unix dos2unix [file] Convert Unix -> Dos unix2dos [file]" current
- 14:4814:48, 21 August 2024 diff hist +28,861 N Docker Troubleshooting and CLI Created page with "* <b>Docker</b> (Main page) * <b>ECR</b> ---- ====<u>Common Docker CLI commands and troubleshooting concepts</u>==== * The <b>$ docker pull</b> command allows you to download an image or set of images (i.e. repository). * The <b>$ docker images</b> command allows you to list the currently downloaded images. * The <b>$ docker build</b> command builds an image from a Dockerfile and a context. The build's context is processed..." current
- 14:4814:48, 21 August 2024 diff hist +57,402 N Docker Created page with "* <b>Docker Troubleshooting and CLI</b> * <b>ECR</b> ====Containers vs Virtual Machines==== ---- center|class=img-responsive <b>Virtual machines</b> (<b>VMs</b>) are an abstraction of physical hardware turning one server into many servers. The hypervisor allows multiple VMs to run on a single machine. Each VM includes a full copy of an operating system, one or more apps, necessary binar..." current
- 14:4814:48, 21 August 2024 diff hist +462 N Dnf Created page with "For <b>Yum, Apt, and Repos</b> stuff, refer to the <b>Yum, Apt, and Repos</b> page. ====Dnf==== ---- <b>DNF</b> is the modern successor to Yum, featuring improved speed, efficiency, and enhanced dependency resolution capabilities. More information: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/managing-software-packages_configuring-basic-system-settings#doc-wrapper"
- 14:4814:48, 21 August 2024 diff hist +95 N Dmesg Created page with "https://www.tecmint.com/dmesg-commands/ ====View Dmesg in Real-time==== ---- dmesg --follow" current
- 14:4714:47, 21 August 2024 diff hist +212 N Dig Created page with "UNDER CONSTRUCTION, PLEASE VISIT BACK SOON. Add notes from gdrive https://stackpointer.io/internet/get-authoritative-dns-for-domain/435/ https://www.rootusers.com/12-dig-command-examples-to-query-dns-in-linux/" current
- 14:4714:47, 21 August 2024 diff hist +185 N Diff Created page with "https://www.geeksforgeeks.org/diff-command-linux-examples/ sudo diff sosreport-A/ sosreport-B/ | grep differ sudo diff -qr sosreport-A/ sosreport-B/ | grep differ (this one better)" current
- 14:4714:47, 21 August 2024 diff hist +2,954 N Df Created page with " <b>df</b> - DISK FREE; Report file system disk space. Df shows the available sizes on your <b>disk partition</b>. Tells you what percentage of the disk is occupied. Shows you what's mounted. ====How To Use Df==== ---- =====Basic Uses===== ---- df df -ah $ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 3.7G 0 3.7G 0% /dev tmpfs 3.7G 0 3.7G 0% /dev/shm tmpfs..." current
- 14:4714:47, 21 August 2024 diff hist +14,949 N Device Mapper Multipath Created page with "====What is Device Mapper Multipathing?==== ---- What is Multipath? • Multipath is a storage network design technique that allows for fault tolerance or increased throughput by providing multiple concurrent physical connections (paths) from the storage to the individual host systems. multipathd and multipath internally use WWIDs to identify devices. WWIDs are also used as map names by default. ——— Device Mapper Multipathing (DM-Multipath) is a native multipat..." current
- 14:4614:46, 21 August 2024 diff hist +4,911 N Dd Created page with " <b>dd</b> - convert and copy a file. REALLY GOOD ARTICLE: https://www.computernetworkingnotes.com/linux-tutorials/generate-or-create-a-large-text-file-in-linux.html ===How to use dd=== ---- This command will create a file of size <b>count*bs</b>, in which the below will create a file of 1 MB: dd if=/dev/zero of=file.txt count=1024 bs=1024 * <b>/dev/zero</b> is a special file in Unix-like operating systems that provides as many null characters as are read from i..." current
- 14:4614:46, 21 August 2024 diff hist +16,419 N DNS Created page with "DNS (Domain Name Server) ====How I have my websites' DNS records set up==== ---- Before proceeding with the [https://dikapedia.com/wiki/SSL_/_TLS#How_to_install_Let.27s_Encrypt_with_Certbot_on_Amazon_Linux_2_.28Super_Easy.29 Let's Encrypt steps to configure SSL cert], I configured my DNS records with the following (on namecheap): * A record - @ - 23.20.238.64 * A record - www - 23.20.238.64 ====DNS==== ---- https://en.wikipedia.org/wiki/Domain_Name_System Good video..." current
- 14:4614:46, 21 August 2024 diff hist +1,221 N DHCP Created page with " DHCP - DORA https://ipwithease.com/understanding-dora-process-in-dhcp/ ====dhclient==== ---- <b>dchlient</b> - the Dynamic Host Configuration Protocol (DHCP) Client used to allow a client to connect to a DHCP server. * You need this if you are not booting up using a static IP address!! dhclient configuration files: $ which dhclient /usr/sbin/dhclient # Another way of checking if dhclient is installed # Run as root $ dhclient status && dhclient --version..." current
- 14:4514:45, 21 August 2024 diff hist +10,387 N Curl Created page with " <b>curl</b> - transfers a URL. Or make HTTP requests (or HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELENET, LDAP or FILE). https://www.thegeekstuff.com/2012/04/curl-examples/ ---- * Useful for testing web servers at the application level, testing an application's endpoint or connectivity, or checking if a service is healthy. * HTTP uses TCP so if curl works then TCP (and lower levels) must be working, too. Can be used in many different ways: * Designed to work wi..."
- 14:4514:45, 21 August 2024 diff hist +3,157 N Cron Created page with " <b>crond</b> - daemon to execute scheduled commands. <b>crontab</b> - Used to schedule repetitive tasks/commands. *must be root* Good info: * https://cronitor.io/cron-reference/5-places-cron-jobs-live * https://www.geeksforgeeks.org/crontab-in-linux-with-examples/ * https://crontab.guru/ * https://unix.stackexchange.com/questions/212703/crontab-error-no-crontab-for-use * https://serverfault.com/questions/449651/why-is-my-crontab-not-working-and-how-can-i-troubleshoo..."
- 14:4414:44, 21 August 2024 diff hist +249 N Cp Created page with "From cp manpage: -p same as --preserve=mode,ownership,timestamps --preserve[=ATTR_LIST] preserve the specified attributes (default: mode,ownership,timestamps), if possible additional attributes: context, links, xattr, all" current
- 14:4414:44, 21 August 2024 diff hist +1,826 N Core Dumps Created page with "Terminology For Unix systems, the term "core dump" generally refers to a dump of the state of an individual process. The term "core dump" is also used in the context of NetWare, but in that context it refers to a dump of the state of a complete system. The equivalent of a NetWare core dump for Unix systems is typically called a "system crash dump" or "kernel crash dump". Core dump analysis Core dumps can be a valuable source of information in certain troubleshooting s..." current
- 14:4414:44, 21 August 2024 diff hist +572 N Context Switch Created page with "<b>Context Switching</b> is when CPU switches to another process, the system must save the state of the old process and load the saved state for the new process via context switch. * Context-switch time is overhead; the system does no useful work while switching. The more complex the OS and the <b>PCB</b> --the longer the context switch. * Context switches are costly as it destroys the TLB buffer. A <b>translation lookaside buffer (TLB)..." current
- 14:4314:43, 21 August 2024 diff hist +1,461 N CloudFormation Created page with "====How to create Redis (cluster mode enabled) with 1 shard using YAML==== ---- <b>CacheParameterGroupName</b> is key to making it cluster mode enabled: AWSTemplateFormatVersion: 2010-09-09 Resources: myReplicationGroup: Type: AWS::ElastiCache::ReplicationGroup DeletionPolicy: Retain Properties: AtRestEncryptionEnabled: true AutomaticFailoverEnabled: true CacheParameterGroupName: 'default.redis5.0.clust..." current
- 14:4314:43, 21 August 2024 diff hist +11,990 N CloudEndure Created page with "====CloudEndure log files==== ---- * Installation log file: <b>./cloudendure.log</b> ** Generated during the agent installation process. ** Located in the directory from which the installation process was initiated. * Agent Logs: <b>/var/lib/cloudendure/agent.log.0</b> ====How to start/stop the CloudEndure Agent==== ---- sudo /var/lib/cloudendure/runAgent.sh sudo /var/lib/cloudendure/stopAgent.sh * <b>Note</b>: stop / starting of the agent causes re-replicati..." current
- 14:4314:43, 21 August 2024 diff hist +9,082 N Cloud-Init and User-Data Created page with "===Cloud-Init=== ---- add notes: https://cloudinit.readthedocs.io/en/latest/topics/dir_layout.html <b>Cloud-init</b> is the industry standard multi-distribution method for cross-platform cloud instance initialization. It is supported across all major public cloud providers, provisioning systems for private cloud infrastructure, and bare-metal installations. Cloud instances are initialized from a disk image and instance data: Cloud metadata User data (optional) Vendo..." current
- 14:4314:43, 21 August 2024 diff hist +2,627 N Chroot Created page with "* Very important to bind /dev since the passwd command makes use of /dev/random which needs to actually exist Robert's way (This example shows how to change a password while chrooted): (all sudo) mount /dev/xvdf1 /mnt mount -o bind /proc /mnt/proc mount -o bind /sys /mnt/sys mount -o bind /dev /mnt/dev mount -o bind /run /mnt/run #This one was recommended but I didn't end up using it chroot /mnt passwd [username] exit umount /mnt/{dev,sys,proc} umo..." current
- 14:4214:42, 21 August 2024 diff hist +112 N Chrome Created page with "Chrome Policy Template json file for Linux: https://gist.github.com/meets2tarun/2161e544f4c458c2f07641cafbdd186d" current
- 14:4214:42, 21 August 2024 diff hist +14,800 N Centrify/Delinea Created page with "This is the Centrify for UNIX/Linux/Mac Command Line Cheat Sheet<br> Ref: https://centrifying.blogspot.com/2016/02/centrify-for-unix-cli-cheat-sheet.html ====AD-bridging commands ("ad" commands)==== ---- <b>adcheck</b> - check OS, network and AD readiness for Centrify DirectControl To check the system with domain (e.g. corp.contoso.com) $ adcheck corp.contoso.com To only perform OS checks $ adcheck --test os To only perform network-related tests $ adcheck --test n..." current
- 14:4214:42, 21 August 2024 diff hist +594 N CPanel Created page with "The cPanel & WHM Log Files https://docs.cpanel.net/knowledge-base/cpanel-product/the-cpanel-log-files/ ====File Manager==== ---- If you don't have direct access to the underlying server of the website but you have access to cPanel, you can use cPanel to access the website files (i.e. public_html, .htaccess (if it's apache), plugins, themes, wp-admin directory, etc.). #. Login to cPanel #. Go to File Manager. ====How to set Expires Headers for Your Site on cPanel=..." current