Master the command line with this 40 terminal commands

2 minute read

dist files

Photo by Gabriel Heinzer on Unsplash

This post will be a bit different from the others because we are going to list 40 terminal commands to be more effective when working with a Unix based operating system.

1 - man: with this command you can open the manual page to see documentation associated to a particular command.

2 - whoami: display effective user id.

3 - clear: To clear the previous commands executed in your terminal.

4 - pwd: print working directory, that tells our current location, current directory.

5 - ls: list the contents of a directory.

6 - cd: change directory. It doesn’t have a man page.

7 - mv: move file, directory from one location to another.

8 - cp: copy file/directory.

9 - touch: this command is useful to create an empty file.

10 - rm: this one is to delete a file.

11 - rmdir: to remove a directory that has to be empty.

12 - open: to open a directory.

13 - less: read the content of a file.

14 - wc: word count utility.

15 - sort : sort content of a file it can be alphabetically or with numbers.

16 - zip: compress a file or a list of files.

17 - diff: see the diffencies between two files.

18 - find: can be used to find files or folders matching a particular search pattern.

19 - grep: you can use it to search inside the files.

20 - du: disk usage statistics.

21 - df: allows to see the disk free.

22 - history: you can display all the history of commands that have been executed.

23 - ps: helps inspecting all the processes running in your computer.

24 - top: display sorted information about processes.

25 - kill: The kill program can send signals to a program. It’s not only used to terminate a program.

26 - gzip: you can compress a file.

27 - nano : a beginner friendly editor.

28 - alias: It’s common to run a program with a set of options you like using.

29 - xargs: is used to convert input from standard input into arguments to a command.

30 - ln: this command can be used to create links. It can be a soft link or a hard link.

31 - who: the command displays the users logged in to the system.

32 - su: useful to switch to another user.

33 - sudo: to run a command as root.

34 - passwd: you can change the password of a user using this command.

35 - chown: you can change the owner of a file or directory with this command.

36 - chmod: this command is used to change permisions of a file/directory.

37 - tar: manipulate tape archives. Can extract and create different kinds of archives.

38 - tail: display last lines of a file.

39 - head: display first lines of a file.

40 - date: display or set date and time.

Conclusion

Any command that you find useful that is not in this list? let me know in the comments below.

I won't give your address to anyone else, won't send you any spam, and you can unsubscribe at any time.
Disclaimer: Opinions are my own and not the views of my employer

Updated:

Comments