Small, useful things I got tired of Googling. Subnet maths, cron schedules, file permissions, your public IP, timestamps, Base64, a port reference and printable cheat sheets, all in one place and all running right here in your browser.
Jump to a tool:
Subnet Calculator Cron Generator What's My IP? chmod Calculator Timestamp Converter Base64 Encoder / Decoder Port Reference Cheat Sheets: chmod, umask, CIDRType an IPv4 or IPv6 network in CIDR form (like 192.168.1.0/24). You get the netmask, the address range, how many hosts fit, and a binary view. You can also split it into smaller subnets, or check whether an address belongs to it.
Build a crontab schedule from plain choices, or paste one you found and see what it really does. You get an English explanation, the next run times, and a ready-to-paste crontab line.
Shows the public IP address this website sees when you connect. That is the address the rest of the internet sees too.
Tick the permissions you want and get the octal number, the ls -l string and the chmod command. Or type a number (like 640) or a string (like rw-r-----) and watch the boxes change.
Turn a Unix timestamp (seconds, milliseconds, microseconds or nanoseconds) into a readable date, or a date into a timestamp. Paste a log line's number and see what time it really was.
Encode text or a file to Base64, or decode Base64 back to text or a file. It handles the URL-safe variant (used in JWTs and URLs) and Unicode text. Files never leave your browser.
Look up what usually runs on a port, or which port a service uses. Search by number (443), name (ssh), a range (8000-8100) or a word (mail, redis, kubernetes). Click a port number for commands to check it on your own machine.
π Encrypted π Clear text π« Keep off the internet β Avoid "IANA" means the official registry lists this port for this service. "Convention" means people just use it that way.
Quick-reference tables for the three things everyone forgets. Pick a sheet, or print all three (each starts on its own page).
Each octal digit is a sum: read 4 + write 2 + execute 1. Three digits are for the owner, the group and everyone else. So 754 is owner 7 (rwx), group 5 (r-x), others 4 (r--).
| Bit | On a file | On a directory |
|---|---|---|
| r (4) | Read the contents | List the names inside (ls) |
| w (2) | Change the contents | Create, delete and rename entries inside (needs x as well) |
| x (1) | Run it as a program or script | Enter it (cd) and reach things inside by name |
To delete a file you need write and execute on its directory. The file's own permissions do not matter (unless the directory has the sticky bit).
| Bit | Octal | Symbolic | On a file | On a directory |
|---|---|---|---|---|
| setuid | 4000 | u+s | Runs with the owner's privileges (ignored on scripts) | No effect on Linux |
| setgid | 2000 | g+s | Runs with the group's privileges | New files inherit the directory's group |
| sticky | 1000 | +t | Ignored on Linux | Only a file's owner (or root) can delete or rename inside it, like /tmp |
| Part | Values |
|---|---|
| Who | u owner g group o others a all. Leave it out and you get "all", filtered by your umask. |
| Operator | + add - remove = set exactly |
| Permissions | r w x X execute only for directories and files that already have it s setuid/setgid t sticky or u/g/o to copy that class's permissions |
| Command | What it does |
|---|---|
| chmod u+x script.sh | Make a script executable for its owner |
| chmod go-rwx file | Remove all access for group and others |
| chmod a=r file | Everyone read-only (nobody can write or execute) |
| chmod u=rw,go=r file | Same as 644 |
| chmod g=u file | Give the group the same permissions as the owner |
| chmod g+s dir | setgid on a directory: new files inherit the group |
| chmod +t dir | Sticky bit on a directory |
| chmod -R u=rwX,go=rX dir | Recursive: directories stay enterable, plain files do not gain execute |
| chmod --reference=a b | Copy the permissions of file a onto file b |
| find . -type f -exec chmod 644 {} + | Set files only (use -type d and 755 for directories) |
The umask lists the permission bits to take away from new files and directories. New files start at 666 (no execute), new directories at 777, and then the umask bits are cleared.
| Example | File | Directory |
|---|---|---|
| umask 022 | 666 minus 022 = 644 | 777 minus 022 = 755 |
Click a umask below to try it in the calculator above.
| Place | How |
|---|---|
| This shell | umask 027 to set it, umask to show it, umask -S for symbolic form |
| One user | A line in ~/.bashrc or ~/.profile |
| Everyone (login shells) | /etc/profile, a file in /etc/profile.d/, or /etc/bashrc on the RHEL family |
| Accounts and PAM | UMASK in /etc/login.defs (and pam_umask) |
| A systemd service | UMask=0027 in the [Service] section |
| A cron job | Cron uses its own default (often 022): put umask 027 && in front of the command |
| A running process | grep Umask /proc/PID/status |
Use the subnet calculator above to work out any specific network.