Linux users can interact with their machines through a wide assortment of different commands. Here, we have in-depth explanations of a variety of these commands.
Subscribe to Linux Commands
Get notified when new articles on Linux Commands are published.
Most modern Unix-like operating system, rely on a centralized package management system for finding and installing software. This guide serves as a quick reference for the fundamentals of finding, installing, and upgr...
1 month ago • By Brennen BearnesLinux CommandsGetting StartedSystem ToolsLinux Basics
I’ve seen this being asked quite a bit, so I’ve decided to write this answer outlining a few ways how to pass environment variables to a Docker container. Hope that this is helpful! If you have any questions post the ...
Accepted Answer: Set environment variable with the -e flag The -e flag can be used to pass environment variables to a Docker container. For example, if you want to pass the environment variable MY_ENV_VAR to the container, you can do ...
1 answer • 2 months ago • By Bobby IlievContainerDockerLinux BasicsLinux Commands
Monitoring a server’s resources is an important task for every administrator. There are many command line tools made for this purpose. This guide will cover some of the more popular utilities for monitoring your VPS.
2 months ago • By Justin Ellingwood, Alex GarnettInteractiveMonitoringLinux Commands
Process management is an essential skill when using any computer system. This is especially true when administrating a server environment. This article will introduce some powerful tools that can be used to manage pro...
2 months ago • By Alex GarnettLinux CommandsLinux BasicsSystem Tools
The Go programming language comes with a rich toolchain that makes obtaining packages and building executables incredibly easy. One of Go’s most powerful features is the ability to cross-build executables for any Go-s...
2 months ago • By Marko MudrinićApplicationsMiscellaneousOpen SourceLinux CommandsUbuntu
Introduction Adding and removing users on a Linux system is one of the most important system administration tasks to familiarize yourself with. When you create a new system, you are often only given access to the root...
2 months ago • By Jamon CamissoLinux BasicsLinux CommandsUbuntu 20.04Interactive
I am running a Python app on my droplet, with Flask, Gunicorn, Nginx talking to PostgreSQL hosted cluster, all on DO platform. I set it up by following this tutorial:https://www.digitalocean.com/community/tutorials/ho...
1 answer • 2 months ago • By BluemontFlaskLinux CommandsPythonUbuntu 20.04
As I was following the tutorial on “How To Serve Flask Applications with Gunicorn and Nginx on Ubuntu 20.04” I was prompted to install various packages, such as Certbot for setting up my SSL certificate. When I did th...
2 answers • 3 months ago • By BluemontDigitalOcean DropletsLinux CommandsUbuntu 20.04
I have a digital ocean droplet, I also have my local windows machine. Currently, I transfer files using psftp and a Batch file that i schedule using windows task scheduler to copy files FROM my windows machine INTO my...
1 answer • 3 months ago • By PumaDigitalOcean DropletsLinux CommandsUbuntuUbuntu 20.04
As I was following through the introduction to Cloud-Config Scripting,I noticed there were no examples of tasks that I usually use on Linux machines. Is it possible to change the root password with cloud-init?
Accepted Answer: Hi there, Yes, this should be doable with the following: #cloud-config chpasswd: list: | root:<^>your_secure_password_here<^> expire: False Hope that this helps!Best,Bobby
1 answer • 4 months ago • By georgesjeandenisLinux BasicsLinux CommandsCentOSCloud ComputingInitial Server Setup
Learning how to manage users effectively is an essential skill for any Linux system administrator. In this guide, we will discuss how to add and delete users and assign sudo privileges on an Ubuntu 18.04 server.
4 months ago • By Jamon CamissoInteractiveLinux BasicsLinux CommandsUbuntu 18.04
i wanted to send an signal to interrupt which is normally ctrl+c, but nothing happened. I tried typing ^c, ^C, and ^[c (option+c generates this one), but nothing worked…
Accepted Answer: Hi @rahil627 , You are correct, it’s ctrl+c . Having said this, sometimes it takes some time for the Droplet to receive the signal and stop the job it’s executing, it’s often experienced when it’s a job that requests ...
1 answer • 5 months ago • By ra the wolfLinux Commands
I want to restrict certain commands to certain users that are sudoers, for example: john ALL=ALL,!/usr/bin/apt-get #john won’t be able to run apt-get My question comes when john can use cp, mv or ln to copy and change...
1 answer • 5 months ago • By Sergio Sánchez MartínezLinux CommandsConfiguration ManagementTeam Management
Hi, Sometimes I’ve to add hundreds of redirects to my NGINX server block. Such a script could definitely make my work easier. I didn’t find ready-made solutions. I’m writing a script that gets addresses from a file an...
Accepted Answer: Hi there, There are probably multiple ways to do it, but I would personally use a for loop to loop through each of the lines fo the file and then use printf to construct the redirect rule as follows: #!/bin/bash if [ ...
1 answer • 5 months ago • By MichalGizaLinux CommandsNginx
Hello,I tried every possible method and tutorial that exists in the internet but ssh still wants me to connect the commands with public,key and password For example i try command ip-copy-id -i id_rsa.pub user@ip -addr...
1 answer • 6 months ago • By akselseriLinux BasicsLinux CommandsUbuntu
Finding files is a very common task on any operating system. The Linux “find” and “locate” commands can both be used to search for files on the filesystem. This guide will cover how to use these two tools to craft spe...
6 months ago • By Justin EllingwoodLinux BasicsSystem ToolsLinux CommandsInteractive
As you administer servers, you will begin to spend a lot of time on the command line. Most likely, you will be using the bash shell. The bash shell includes a lot of commands and expansion capabilities to take advanta...
6 months ago • By Justin EllingwoodLinux BasicsLinux CommandsInteractive
I’d like for my droplet image to do the following: Boot Ubuntu 20 Start a process (using services.d or whatever) When the process finishes, invoke poweroff For the droplet to truly power off I haven’t been able to mak...
1 answer • 6 months ago • By joriswDigitalOcean DropletsLinux Commands
Hello,I am writing a script which, among other things, generates Nginx configuration. Unfortunately, I ran into a problem. In Nginx config, I need to type $1. I use the following method for this: cat > /etc/nginx/site...
Accepted Answer: Hello, What you could do is just use a backtick to escape the dollar sign: cat > /etc/nginx/sites-available/website <<EOL ... rewrite ^/api/?(.*)$ /web/api.php?url=<^>\<^>$1 last; ... EOL Hope that this helpsRegards,B...
1 answer • 7 months ago • By MichalGizaLinux Commands