Samsung T7 Shield SSD vs T7 and T7 Shield Speed Test.
Samsung T7 Shield SSD unboxing and build quality close look.
Samsung portable SSD T7 and T7 Shield are compact portable external SSD made for fast and secure access to your files.
Samsung T7 Shield SSD Speed tests
They work with Android, Windows and Mac. Samsung T7 and T7 Shield are very similar and while the T7 SSD is compact and has high performance for read and write speed. The T7 Shield offers the same read and write speed but in a more rugged enclosure.
The T7 Shield is resistant to water and dust and it’s even impact resistant. Samsung T7 Shield is covered in a soft rubber-like material that smelled like inflatable beach toys to me. The outer layer is soft and grippy so you have less chances to drop the T7 Shield.
On USB 3.2 Gen 2 the T7 Shield reaches the full read/ write speed.
Using the T7 Shield with a USB 3.0 extension gave unexpected freezes in transfers and eventually the T7 Shield SSD became unresponsive.
If you need a USB 3.2 Gen 2 extension cable, better look for a USB 3.2 Gen 2 hub that can sit on your desk and you plug the T7 Shield in the hub then unplug it using safe remove on Windows 11.
USB 3.0 and USB 3.2 Gen 1 Speed test
On a PC front panel the USB ports are USB 3.0 usually. This is the speed you can expect and I had around 500MB/s transfer speeds on a USB 3.2 Gen1 port.
USB 3.0 and USB 3.1 Gen 1 will give you very similar USB transfer speeds.
If speeds is important
If you must have the maximum speed you paid for, you must use USB 3.1 Gen 2 or USB 3.2 Gen 2 and avoiding USB 3.0 extension cables. Directly into the USB port or in a USB 3.2 Gen 2(x1) Hub at least.
Features
Password protection 3 meter drop resistance IP65 water and dust resistance
Performance
Up to 1050MB/s read speed and 1000M write speed Supported by USB 3.2 Gen 2(10Gbps) Utilizes rhe PCIe NVMe interface AES-256-bit hardware encrypted password protection
Hetzner aka the mail server not hosting. Hetzner blocks mail server ports 24 and 465 incoming and outgoing but allows port 587. You could make a mail server work on Hetzner Cloud hosting.
Asked on reddit hetzner vs digital ocean in 2022.
Now on Digitalocean, looking for a cheaper option after they increased the prices. Heard about Hetzner before but didn’t go with it. It looked more like the old style of shared cpanel hosting.
Lowest Droplet vs Lowest Hetzner cloud? Anyone made the move and is happy or not? Hezner cloud means VPS yeah? Like a do droplet.
Thinking of relative performance overall, sites response time.
My concerns before moving
Can you fund your account with a set amount and then they lower the balance? Or you must pay hosting cost every month (manual or automatic). Turns out yes you can by bank transfer – old school.
Saw PayPal there but also a 20 EUR load amount to verify identity so didn’t touch that!
Cpx11 was looking good 2 vcpu, 2gb ram 40gb disk space. Nice.
Another concern
It’s a hassle to move but already did a migration from one do vps to another.
I’d like to think this time would be better.
Does Hetzner allow emails or to listen on any port? I know people hate that but it’s not for spam and mostly to send to our own email as alerts / notifications.
Answer is no, talk to support it’s fast.
Interesting, I bet it will take a week if I do it haha (will be months…if I stay). Edit: I was hoping there is some kind of firewall settings but if it’s granted fast it should be ok.
Asked, they said no emails until 1 month or 1 invoice or something about building trust like they have to trust me not their devops infrastructure and security.
Cloud Protection
I’ve read if you get ddos’d they could actually kill your server and account.
Someone starting a DDOS would be so happy they caused their target’s termination.
Moving from Digital Ocean to Hetzner
So I migrated today, rushed but wanted it done.
Nice specs on 4.75 euro cpx11, 2gb ram, 2 vcpu but.
In reality, it’s the same performane (wordpress +db page speed) as digitalocean 1gb ram, 1 vcpu. Strange, maybe under a stress load, there would be some difference.
Emails problem on Hetzner
I open a ticket to allow email ports, got rejected. Account too young and not 1 invoice paid yet… Later i can request limits increase but they might still reject it. I’ll see about emails maybe start tls instead of ssl would work. It didn’t for outbound emails.
Support
They are very fast to say no.
Server startup was fast no problems there.
Now my gmail keeps asking for credential because of Hetzners paranoid email port policy.
The biggest problem with Hetzner is speed
Made a backup after got it setup, ftp dowload to local pc, 10 mbps max 14 mbps. Digital ocean was reaching full speed of my home connection 100MBps.
This was more of a way to verify the migration scripts.
Btw, you can spinup 5 servers max and lookup the ipv4 they give you for spam db reports just in case.
Lots of their ips are listed allover spam databases anyway.
I chose the one with least reports.
Still looking for a good $5 hosting.
My Hetzner story
Update after migration, feeling the Hezner cpx11 server. Not bad but not great.
This website is at this time 12 July 2022 hosted on Hetzner coupled with Cloudflare CDN.
Got the low cost but juicy AMD Epyc cpx11 with 2vcpu and 2gb ram. More resources for less money on paper. In practice it’s very similar for low volume traffic.
Websites use Cloudflare CDN so for me speed from Cloudflare to Hezner Ashburn, Virginia US is OK.
Website load time without Cloudflare CDN – DNS Pass-thru is actually the same as DigitalOcean $6 1vcpu 1gb ram so that’s strange but under stress it would show some difference hopefully.
it looks nice in htop, all migrated in 1 day.
Migration scripts improved so next time it’s easier.
I don’t need super good uptime but if the server is down and I see it down and it’s a whole day, I would move asap. For me no problems like this so far, all up and running.
Speaking of moving I don’t trust them. Even less than DigitalOcean. But I trust Hezner more than AWS to not sneak some funky extra charges.
All ok, nothing too crazy except a strange out bandwidth problem. Copying a backup out from the server was going slow at 3mbps while DigitalOcean was full speed of my home ISP 100mbps.
The slow speed happens on regular Filezilla Client connecting to the server thru ssh on a custom ssh port 4 digits. It might aswell be that Hetzner is rate limiting custom ports? this would be the cherry on the Hezner Cloud hosting cake. No they say no port speed limiting.
Try it with your server. For me similar location is US, was full ISP speed, now it’s ADSL speed equivalent transfer.
If they can give good reasons for blocking smtp, rate limiting ports is another story. Unless it’s just their server network being slow, yesterday and today.
SSH transfer speed from Hetzner server
Dowload speed from the server to local Filezilla client won’t exceed 1.5 Mib/s now 1.6Mib/s
Transfer time approx. 5 minutes for a approx. 500 MB file.
Fast.com speed test on home network.
What do you think?
Sent support question 12-07-2022
I download a tar.gz file from the server to my PC.
Why is it so slow?
Filezilla connecting to SSH on custom port 2772.
Are you rate-limiting non-default ports?
DigitalOcean ssh speed on same setup, client and port was much much faster.
Why is this so slow?
12-07-2022, at least they do reply fast.
Support answer.
Dear client,
Thank you for your request.
We do not limit the bandwidth from our side. Your performance can vary according to the load on the host.
The host server has a 10 Gbit/s uplink. The bandwidth is shared and we do not offer a guaranteed bandwidth.
Experience shows that you can expect about 300 - 500 Mbit/s on average.
Should you have any further questions please do not hesitate to contact us.
I reply, trying to make sure they saw the actual speed.
Did you see the screenshots attached?
Between 600Kib/S and 1.6Mib/S
Is that acceptable?
Now it's 2.1 Mib/S
Is the host server I'm on overloaded?
Reply came fast again.
Can you try download this files to your server?
>>https://speed.hetzner.de/
What speeds are you getting?
Downloading to my PC from your link.
Speed about 1.7 MB/s
A bit better but still low.
Tests show similar slightly higher speeds but still low.
It’s probably the distance from them to me.
As long as Cloudflare can get the files much faster it’s no big deal just annoying when copying backups out from their server.
Went ahead and took a screenshot from the Hetzner Cloud Control Panel for our new Hezner server. Not even reached 3MBps during the transfer and you can see it’s fluctuating a lot?
If you want to try DigitalOcean try it with this link bellow to get $100 FREE credit for 60 days. https://rex.red/do
You get $100 free credit for 60 days and you can try different droplets or managed stuff.
After you use your free 20 EUR free credit if you pay at least 10 EUR I get 10 EUR free credit.
The Hetzner link I used to signup gave me 20 euro from 11 July 2022 but the credits expire on 01 September 2022.
Hmm. that’s a bit on the short end.
Looking forward to hear Cloudflare introduces it’s own hosting plans.
Any comments?
Please write bellow, I still believe Hetzner is great value for money after learning to live with their problems.
Conclusion
After using Hetzner for a while update on 16 July 2022.
The Hetzner cpx11 cloud server is indeed faster than a $6 DigitalOcean droplet. Really happy about that.
Realized, recently, Cloudflare has an Email service in Beta.
Already using free email forwarders from CloudFlare.
The only problem left is WordPress not sending email, that I plan to use with Google Could Gmail API.
Not the paid Google Workspaces (that’s super easy to setup) but by using the Gmail API to send SMTP emails thru Google Could Oauth client id and client secret.
If the Gmail SMTP works, there is no need for email on the Hetzner server anymore.
This would make the migration to another Hetzner cloud server or another cloud server provider in the future much easier with a backup and restore script.
By the way, for a while, since migrating away from Centos 7 (end of support drama with RedHat Centos 8 Stream), I can say that RockyLinux 8 (8.6) is the choice OS now for me.
Really like to see RockyLinux 8.6 being one of the easy cloud server spin-up options on Hetzner and DigitalOcean.
Update Hetzner vs Digital Ocean in 2023 and plans for 2024
Since my move back to Digital Ocean not much changed other than actively using Couldflare R2 storage for web workloads.
File storage in Cloudflare R2 is really easy and keeping up with the fees can be managed with billing alerts.
In general, I love Cloudflare CDN because it can make a slow website blazingly fast. This website hopefully was super fast to load thankfully there was a cache Hit and not a cache Miss in your response headers for this page.
I added a referral link to Hetzner to be fair. Anyone wanting to try one can try both like this
The best linux distribution of 2021 is not easy to decide. First choice is if you prefer a Linux distro that is RHEL based or Debian based.
For a Linux server or a Linux desktop the requirements are quite different. There is no best linux distro really. Most of the established Linux distributions are great to use.
Put the names of most known Linux distros. in a hat. Pick one, that’s the best distro for 2021 and 2022. Jokes aside, you should choose what you are even slightly used to.
RHEL based Linux distributions
If you goal is to use Linux in a professional environment – at work that is. RHEL based distros. will make you familiar to the Linux enterprise environment and things will be much more familiar on Red Hat Enterprise Linux (RHEL) once You used a similar OS.
Linux distro for server
For a server, you want to choose a distro that is well known and stable. Good reputation is very important. Tested packages before release is much more important. Long support and updated and running without crashing are basic requirements for a Linux server.
Red Hat Enterprise Linux – RHEL
The OS that many Linux distros. are based on is a top-tier enterprise Linux distro. With top support, security updates for critical operations. This one is not free but Red Hat have a developer subscription licensing program that allows for 16 production RHEL instances for free. More about RHEL Developer subscription here.
Centos 8 / Centos Stream
Centos 8 and Centos Stream have caused some controversy recently. Centos 7 was a downstream release distro. Updates were released on Centos 6 and 7 after they were released on RHEL 6 or 7. Now Centos 8 is upstream compared to RHEL 8. This means, updates are sent to Centos first then to RHEL. That places Centos after Fedora and before RHEL in the updates flow making Centos a testing step before RHEL instead of using fully tested packages.
With all the problems Centos 8 and Centos Stream is still a great Linux server distro to consider. Centos is free.
Since the Centos 8 announcement, people have been looking for a new RHEL based distro that is downstream from RHEL. For this, these new distros. where recently created basically rebranding RHEL sources and adding their own to make a new distro.
I’ve tried Rocky Linux and the setup was the same as Centos 8.
Oracle is a huge company known mostly for Oracle Database and Java but I won’t go into details there. The Oracle Linux 8 is binary compatible with RHEL 8 and Many things are the same as in the Red Hat distro but they mention their kernel is unbreakable as part of the name. They have paid support available for Oracle Linux 8 but the base version is free.
Ubuntu is based on the Debian distro. It is very popular for both desktop and server.
The LTS in the release details stands fro Long Term Support and it’s what you would want to use in general. It’s one of the default choices when setting up a new Linux server on AWS or Microsoft Azure or Google Cloud.
Linux has conquered the world of servers and even smartphones and tablets. Android is based on a modified version of Linux. For Desktop, Linux didn’t do so well. Crome-books might change that in the future.
Fedora 34 Workstation
A RHEL based linux distribution that Linus Torwalds (the maker of Linux and Linux kernel) claims to be using on his desktop computers or laptops.
Gets the newest packages first but can be unstable.
Try any of these or any other distros you might want to look at. For server would I choose Centos 8 and for Desktop Fedora but that’s my preference. You might like Arch more or Ubntu or even Oracle Linux.
How to check disk space in Linux command line. The command df shows you free disk space and du returns the disk usage statistics for various files and folders.
df command
The df command shows disk usage statistics and it stands for “Disk Free”.
The df command bellow without any options will return the disk size, disk used, available size, disk free percentage and mount point for all system partitions.
-a, --all include pseudo, duplicate, inaccessible file systems
-h, --human-readable print sizes in powers of 1024 (e.g., 1023M)
-T, --print-type print file system type
du command
The du command shows disk usage of directories and files. It’s useful to find folders and files that use a lot of disk space.
List all files and folders with their size in the current directory.
du -h
Show disk usage of all files
du -ah
ls
Lists folders and files and shows their size on disk, human readable.
To delete a directory in Linux remove command to use is rm or rmdir. Both work fine but there is an important difference between how rm and rmdir remove a directory.
Caution
If you delete a directory from the GUI even in Linux, the folder is moved to the Trash bin. It is not really deleted right away.
If you remove a file using command line it skips the Trash bin – the directory gets deleted now not later!
Use ls /directory-path/your directory/ to be sure this is the actual directory you want the be deleted.
rm command
The rm command can be used to delete directories but also file and also everything if you are not careful.
There are many jokes and memes about the command “rm -rf /” but you should know what it does. It deletes everything, no questions asked -f and recursive in sub-directories -r in the root of your system / so it really deletes everything.
rm -r directory/
-r is for recursive – subfolders and files
rm -rf directory/
–rf is recursive and force – no questions – deletes all it can in the target directory you specify.
It deletes a directory without having to specify extra parameters.
In a way it is easier and safer than rm with the -rf options.
rmdir /directory-path-to/your-directory
or
cd /directory-path-to
rmdir your-directory
or just
rmdir your-directory/
If the directory is not empty you will receive the error
[dragos@localhost ~]$ rmdir rex.red/
rmdir: failed to remove 'rex.red/': Directory not empty
To delete a non-empty directory use rm -r directory/ instead.
Example
[dragos@localhost ~]$ mkdir test-diy.rednumberone.com
[dragos@localhost ~]$ ls
8 file filed fileee logfiles printtest rex.red test test1 test3 test-diy.rednumberone.com test.html
[dragos@localhost ~]$ ls | grep diy
test-diy.rednumberone.com
[dragos@localhost ~]$ rmdir test-diy.rednumberone.com
[dragos@localhost ~]$ ls | grep diy
[dragos@localhost ~]$ ls
8 file filed fileee logfiles printtest rex.red test test1 test3 test.html
[dragos@localhost ~]$
Remove directory with find
Find is a command line utility that can list files or directories but with the exec command and {} + option it executes the new command and passes it’s output directory path as an argument.
If you want to delete one or multiple directories it’s better to run the find command without exec to see if this is really what you want to remove in the first place.
find /home/dragos/test1 -type d -name '*-testlogs'
If you would like to find and delete all *-testlogs folders / directories you can use the bellow command.
How to Compress and Extract Files using the tar command on Linux and How to create tar.gz file in Linux command line
Compress files
The tar command is used to pack and compress files and directories on Linux.
The archived files are usually named .tar.gz or .tgz and are called usually tarballs.
As with many Linux commands, there are many options that can be used with the tar command.
Tar can compress and also extract .tar.gz or .tgz archives.
Example command to backup multiple directories into a tarball.
tar -czf /var/dibackup/backup-$datetxt.tar.gz /etc/ /home/ /var/www/ /var/dibackup/db-backup/
Here -czf means create a new archive, use gzip, specify the archive file name and compress the following files/directories – multiple paths are passed separated by space.
If you want to see more details about the process you can also use the -v option, v is for verbose listing of processed files.
tar -czvf /var/dibackup/backup-$datetxt.tar.gz /etc/ /home/ /var/www/ /var/dibackup/db-backup/
If you would like to exclude some directories you can use the –exclude option
tar -czvf /var/dibackup/backup-$datetxt.tar.gz /etc/ /home/ /var/www/ /var/dibackup/db-backup/ --exclude=/home/dragos/Downloads
Once finished, you will have a .tar.gz or .tgz file that is the archive.
Test – list archive contents
To list all files in the archive. Lists all files in archive-file.tgz verbosely.
tar -tvf archive-file.tgz
Extracting files from archive
When you need to extract the archive to the current directory you can use use the command bellow. Extracts all files from archive-file.tgz.
tar -xf archive-file.tgz
or to specify gzip
tar -xzf archive-file.tgz
or for verbose
tar -xzvf archive-file.tgz
Extract to directory
If you want the archive to be extracted to a specific directory you can use the -C option (capital C) change to directory DIR.
tar -xzf archive-file.tgz -C /home/dragos/archive-extracted
Using bzip2 instead of gzip
To use bzip2 compression instead of gzip, replace the -z option in the above commands with -j
tar command options used
Options used explanations:
-c, --create create a new archive
-z, --gzip, --gunzip, --ungzip filter the archive through gzip
-f, --file=ARCHIVE use archive file or device ARCHIVE
-v, --verbose verbosely list files processed
-t, --list list the contents of an archive
-j, --bzip2 filter the archive through bzip2
--exclude=PATTERN exclude files, given as a PATTERN
-C, --directory=DIR change to directory DIR
All command options
To see the available options you can see the man page or help or the tar command.
tar --help
man tar
If you are using Windows 10 or Windows 11 there is a good archiving tool called 7-Zip. You can use it to create or extract archives. Even archives created with tar on Linux.
To set a new environment variable, use the export command.
export NAME=VALUE
For example to set the environment variable called TEST_HOME you can run this command.
export TEST_HOME=/home/rex.red/test_service_home
This prints the value of the variable you set earlier.
echo $TEST_HOME
Unsetting an environment variable
The following command will be used to unset the environment variable.
unset VARIABLENAME
Set a persistent environment variable
If you set the variable from the shell, once you log out of your session, the variable is lost.
To make an environment variable persistent across sessions you can export the variable in the user’s profile script.
vim ~/.bash_profile
# User specific environment and startup programs
export TEST_HOME=/home/rex.red/test_service_home
How to create a file in Linux using Terminal or SSH
How to create a file in Linux using Terminal, Command line interface or SSH.
There are a few ways to create a new empty file or redirect the output of a command to a new file. To create an empty file, any of these commands can accomplish that without having to install any extra packages or modules.
touch
Touch creates an empty file in the path you specify. Easy
touch file
touch /var/rex.red/file1
>file
Simply created an empty file with the name you write.
>file
or in a directory
>/var/rex.red/test4
echo
You can also add text with echo but this creates a new empty file.
echo -n >file
echo >/var/rex.red/file
printf
Same idea as with echo but using prinf if you prefer it like this.
printf ''>file
Create file from text output
Create non-empty file
If you need to save a file but with contents it’s still pretty easy.
echo
echo 'file contents' > file
printf
printf 'file contents\ntest\n' > file
ls > file
ls -lh /var/log/ > logfiles
cat >
cat file1 > file2
vim
Create the file and edit it. Insert key – When finished save it :wq to save and exit vim.
The tree command will list you directory, files and sub folders contents in an easy to see way.
No need for repeated ls commands.
This can be useful to get an overview of all subfolders of the target directory.
Stop the process, end it now and don’t wait for anything.
kill -9 PID
[dragos@localhost ~]
$ sudo kill -9 3778526
ps -aux | grep log
List processes piped into grep to find a hanging process.
Extremely useful for finding what is happening with a process that is still running but takes much longer than expected. You can get some hints about what is wrong using this command combination.
sudo !!
yum update
sudo !!
[dragos@localhost ~]$ yum update
Error: This command has to be run with superuser privileges (under the root user on most systems).
[dragos@localhost ~]$ sudo !!
sudo yum update
[sudo] password for dragos:
Last metadata expiration check: 2:55:04 ago on Tue 31 Aug 2021 13:10:23 EEST.
Dependencies resolved.
Nothing to do.
Complete!
[dragos@localhost ~]$
alias command shortcut name = “the actual command”
alias sayhello="echo ""Hello World!"""
[dragos@localhost rex.red]$ alias sayhello="echo ""Hello World!"""
[dragos@localhost rex.red]$ sayhello
Hello World!
[dragos@localhost rex.red]$
This will last while you are still logged in. If you log out and logon again, the alias will be gone.
Permanent alias
Making the alias permanent for your user. You save it in your .bashrc file.
vim ~/.bashrc
Add the alias at the end of the file.
# User specific aliases and functions
#My Aliases
alias sayhello="echo ""Hello World!"""
Save the file – in vim Esc then :wq enter
Make sure you use the file
source ~/.bashrc
Your alias is there even after a reboot.
whereis
Powerful command to locate files or directories on your drive.
Most useful to find binaries of installed programs.
whereis httpd
free
free -h
RAM allocation and usage statistics.
[dragos@localhost ~]$ free
total used free shared buff/cache available
Mem: 1859812 613712 453892 53532 792208 1036984
Swap: 2158588 234220 1924368
[dragos@localhost ~]$ free -h
total used free shared buff/cache available
Mem: 1.8Gi 599Mi 443Mi 52Mi 773Mi 1.0Gi
Swap: 2.1Gi 228Mi 1.8Gi
[dragos@localhost ~]$
service
service service-name action
[dragos@localhost ~]$ service -h
Usage: service < option > | --status-all | [ service_name [ command | --full-restart ] ]
It’s useful to find problems with a daemon or service.
It is also used to (start, stop, restart, try-restart, reload, force-reload, status) various services.
service httpd status
[dragos@localhost ~]$ service httpd status
Redirecting to /bin/systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: inactive (dead)
Docs: man:httpd.service(8)
[dragos@localhost ~]$
[dragos@localhost ~]$ sudo service httpd start
[sudo] password for dragos:
Redirecting to /bin/systemctl start httpd.service
[dragos@localhost ~]$ sudo service httpd enable
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
[dragos@localhost ~]$
You can start a service but to enable it on startup use systemctl.
[dragos@localhost ~]$ sudo service httpd start
[sudo] password for dragos:
Redirecting to /bin/systemctl start httpd.service
[dragos@localhost ~]$ sudo service httpd enable
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
[dragos@localhost ~]$ sudo systemctl restart httpd
[dragos@localhost ~]$ sudo systemctl reload httpd
[dragos@localhost ~]$ sudo systemctl stop httpd
[dragos@localhost ~]$ sudo systemctl start httpd
[dragos@localhost ~]$ sudo systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[dragos@localhost ~]$ sudo systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: active (running) since Tue 2021-08-31 18:36:43 EEST; 11s ago
Docs: man:httpd.service(8)
Main PID: 3778525 (httpd)
Status: "Running, listening on: port 80"
Tasks: 213 (limit: 11255)
Memory: 26.1M
CGroup: /system.slice/httpd.service
├─3778525 /usr/sbin/httpd -DFOREGROUND
├─3778526 /usr/sbin/httpd -DFOREGROUND
├─3778527 /usr/sbin/httpd -DFOREGROUND
├─3778528 /usr/sbin/httpd -DFOREGROUND
└─3778529 /usr/sbin/httpd -DFOREGROUND
Aug 31 18:36:43 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
Aug 31 18:36:43 localhost.localdomain systemd[1]: Started The Apache HTTP Server.
Aug 31 18:36:43 localhost.localdomain httpd[3778525]: Server configured, listening on: port 80
lines 1-21/21 (END)
dig
Complete DNS query to find any record related to a domain, name server, root nameserver
dig rex.red
[dragos@localhost ~]$ dig rex.red
; <<>> DiG 9.11.26-RedHat-9.11.26-4.el8_4 <<>> rex.red
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29461
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;rex.red. IN A
;; ANSWER SECTION:
rex.red. 299 IN A 172.67.218.197
rex.red. 299 IN A 104.21.38.42
;; Query time: 347 msec
;; SERVER: 10.4.60.20#53(10.4.60.20)
;; WHEN: Tue Aug 31 10:51:06 EEST 2021
;; MSG SIZE rcvd: 68
The any parameter will give you all the DNS records of that domain.
It’s useful to get an overview of the setup of a domain.
[dragos@localhost ~]$ dig rex.red any
; <<>> DiG 9.11.26-RedHat-9.11.26-4.el8_4 <<>> rex.red any
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28600
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 13
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;rex.red. IN ANY
;; ANSWER SECTION:
rex.red. 243 IN A 104.21.38.42
rex.red. 243 IN A 172.67.218.197
rex.red. 3597 IN NS chan.ns.cloudflare.com.
rex.red. 3597 IN NS alec.ns.cloudflare.com.
rex.red. 3786 IN HINFO "RFC8482" ""
;; ADDITIONAL SECTION:
chan.ns.cloudflare.com. 11396 IN A 172.64.32.82
chan.ns.cloudflare.com. 11396 IN A 173.245.58.82
chan.ns.cloudflare.com. 11396 IN A 108.162.192.82
chan.ns.cloudflare.com. 1707 IN AAAA 2803:f800:50::6ca2:c052
chan.ns.cloudflare.com. 1707 IN AAAA 2a06:98c1:50::ac40:2052
chan.ns.cloudflare.com. 1707 IN AAAA 2606:4700:50::adf5:3a52
alec.ns.cloudflare.com. 7750 IN A 172.64.33.59
alec.ns.cloudflare.com. 7750 IN A 173.245.59.59
alec.ns.cloudflare.com. 7750 IN A 108.162.193.59
alec.ns.cloudflare.com. 80123 IN AAAA 2a06:98c1:50::ac40:213b
alec.ns.cloudflare.com. 80123 IN AAAA 2606:4700:58::adf5:3b3b
alec.ns.cloudflare.com. 80123 IN AAAA 2803:f800:50::6ca2:c13b
;; Query time: 3322 msec
;; SERVER: 10.4.60.20#53(10.4.60.20)
;; WHEN: Tue Aug 31 10:52:02 EEST 2021
;; MSG SIZE rcvd: 408
[dragos@localhost ~]$
+nocomments option makes the response more compact by removing the comments of each section and giving you only the actual response.
[dragos@localhost ~]$ dig rex.red any +nocomments
; <<>> DiG 9.11.26-RedHat-9.11.26-4.el8_4 <<>> rex.red any +nocomments
;; global options: +cmd
;rex.red. IN ANY
rex.red. 10 IN A 172.67.218.197
rex.red. 10 IN A 104.21.38.42
rex.red. 3364 IN NS chan.ns.cloudflare.com.
rex.red. 3364 IN NS alec.ns.cloudflare.com.
rex.red. 3553 IN HINFO "RFC8482" ""
rex.red. 157 IN TXT "google-site-verification=C0S4gecD15hMlSjLUF0bGRNURsYoleGS-v_1zCJ6mr4"
chan.ns.cloudflare.com. 11163 IN A 173.245.58.82
chan.ns.cloudflare.com. 11163 IN A 108.162.192.82
chan.ns.cloudflare.com. 11163 IN A 172.64.32.82
chan.ns.cloudflare.com. 1474 IN AAAA 2a06:98c1:50::ac40:2052
chan.ns.cloudflare.com. 1474 IN AAAA 2606:4700:50::adf5:3a52
chan.ns.cloudflare.com. 1474 IN AAAA 2803:f800:50::6ca2:c052
alec.ns.cloudflare.com. 7517 IN A 173.245.59.59
alec.ns.cloudflare.com. 7517 IN A 108.162.193.59
alec.ns.cloudflare.com. 7517 IN A 172.64.33.59
alec.ns.cloudflare.com. 79890 IN AAAA 2606:4700:58::adf5:3b3b
alec.ns.cloudflare.com. 79890 IN AAAA 2803:f800:50::6ca2:c13b
alec.ns.cloudflare.com. 79890 IN AAAA 2a06:98c1:50::ac40:213b
;; Query time: 26 msec
;; SERVER: 10.4.60.20#53(10.4.60.20)
;; WHEN: Tue Aug 31 10:55:55 EEST 2021
;; MSG SIZE rcvd: 489
[dragos@localhost ~]$
Looking ony at the TXT DNS records of the domain.
[dragos@localhost ~]$ dig rex.red txt +nocomments
; <<>> DiG 9.11.26-RedHat-9.11.26-4.el8_4 <<>> rex.red txt +nocomments
;; global options: +cmd
;rex.red. IN TXT
rex.red. 26 IN TXT "google-site-verification=C0S4gecD15hMlSjLUF0bGRNURsYoleGS-v_1zCJ6mr4"
;; Query time: 0 msec
;; SERVER: 10.4.60.20#53(10.4.60.20)
;; WHEN: Tue Aug 31 10:58:06 EEST 2021
;; MSG SIZE rcvd: 117
[dragos@localhost ~]$
The default is a which returns the IPv4 of the domain.
q-type is one of (a,any,mx,ns,soa,hinfo,axfr,txt,…) [default:a]