loading...
Cover image for Basic Linux Commands

Basic Linux Commands

andrejarrell profile image Andre Jarrell ・1 min read

Developers 💖 Linux! It is Open Source, Secure, Powerful, Customizable, and Reliable!

🎈 Basics

> ls

Lists contents in directory.

bin   dev  home        initrd.img.old  lib64       media  opt   root  sbin  srv  tmp  var      vmlinuz.old
boot  etc  initrd.img  lib             lost+found  mnt    proc  run   snap  sys  usr  vmlinuz

> cd [path]

Changes directory.

> pwd

Prints working directory.

/home

> mkdir [directory name]

Creates a directory with the given name.

> touch [file name]

Creates a file with the given name.

> rm [file]

Removes files. Use recursive -r if removing folder.

> cat [file]

Prints contents of file.

> nano [file]

Edit a file in the terminal.

> top

Show top process that are running.

> reboot

Reboots linux

> ping [ip]

Pings an IP address.

PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=59 time=1.74 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=59 time=1.61 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=59 time=1.27 ms
^C
--- 1.1.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 1.270/1.544/1.743/0.200 ms 

✨ Bonus

> telnet towel.blinkenlights.nl

Watch Star Wars via Telnet.

                                             ====
                                             o o~~
                                            _\- /_
                                ___        / \ /  \
                               /() \      //| |  |\\
                             _|_____|_   // | |  |//
                 ,@         | | === | | //  | |  //
                 /=-        |_|  O  |_|('   |===(|
                 ||          ||  O  ||      | || |
                 ||          ||__*__||      (_)(_)
               --~~---      |~ \___/ ~|     |_||_|
               |     |      /=\ /=\ /=\     |_||_|
      _________|_____|______[_]_[_]_[_]____/__][__\______________________

Posted on by:

Discussion

pic
Editor guide