DEV Community

Cover image for Linux Commands For Everyday Life
jones268
jones268

Posted on

Linux Commands For Everyday Life

Learning Linux commands is one of those things that help you in your everyday life as a programmer, systems administrator or IT professional. So today I compiled a list of everyday linux commands that you might find useful in real life.

Linux commands

Linux is solid, but you don’t realize how much you depend on it until something goes wrong. Whether it’s a simple fix or you have no idea what’s going on. We’ll start with the basics:

ls : List contents of directory

$ ls
public_html
Enter fullscreen mode Exit fullscreen mode
$ ls -l
-rw-r--r-- 1 owner group 0 Jan 23 13:09 index.html
Enter fullscreen mode Exit fullscreen mode
$ ls -l /tmp/
total 616
drwxrwxrwt 27 root root 4096 Oct 22 14:09 .
Enter fullscreen mode Exit fullscreen mode

cd : Change directory

user@hostname:~$ cd /etc
user@hostname:/etc
Enter fullscreen mode Exit fullscreen mode
user@hostname:~$ cd /usr/local/bin
user@hostname:/usr/local/bin
Enter fullscreen mode Exit fullscreen mode

pwd : Show current directory

user@hostname:/usr/local/bin$ pwd
/usr/local/bin
user@hostname:/usr/local/bin$ 
Enter fullscreen mode Exit fullscreen mode

sudo : run command as root (admin)

$ sudo ls
[sudo] password for user: 
Enter fullscreen mode Exit fullscreen mode

run a program

$ ./app
Enter fullscreen mode Exit fullscreen mode

What's next? 😁

As a Linux user, you have more commands than you can count at the tip of your fingers.

In fact, you have enough commands to do every day tasks, including:

  • Using git version control for your project
  • Connecting to your web server over ssh
  • Controlling your file system
  • Searching for files containing a particular word in the file path
  • Backup databases or interact with them
  • See your web server logs for security attacks
  • Opening up a terminal-based text editor either locally or remotely

To get to a Linux pro level quickly, I recommend this tutorial

Top comments (0)