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
$ ls -l
-rw-r--r-- 1 owner group 0 Jan 23 13:09 index.html
$ ls -l /tmp/
total 616
drwxrwxrwt 27 root root 4096 Oct 22 14:09 .
cd : Change directory
user@hostname:~$ cd /etc
user@hostname:/etc
user@hostname:~$ cd /usr/local/bin
user@hostname:/usr/local/bin
pwd : Show current directory
user@hostname:/usr/local/bin$ pwd
/usr/local/bin
user@hostname:/usr/local/bin$
sudo : run command as root (admin)
$ sudo ls
[sudo] password for user:
run a program
$ ./app
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)