This is part 2 of the “Terminal Commands Every Geek Should Know” series. This series explains a number of basic UNIX/Linux commands. You can read part 1 here.
1. Text editors
There are a number of different text editors for UNIX/Linux systems. Two of the more popular and usually pre-installed text editors are nano and vi. To open a file in nano or vi, simply execute “nano” or “vi” followed by the text file you would like to edit. For example, if you wanted to edit a file called “textfile.txt”, you would execute either
“nano textfile.txt” or “vi textfile.txt“.
2. uptime
The “uptime” command simply prints how long the system has been up, when it was last down, load averages, etc.
3. man
The “man” command, short for “manual”, will display a help page for a specific command. For example, “man ls” displays the help page for the “ls” command.
4. cp
The “cp” command, short for “copy”, copies one file into another directory. For example, “cp /somedir/test.txt /anotherdir/test.txt” would make a copy of the file “/somedir/test.txt” in “/anotherdir/test.txt”.
5. Ctrl + C
To immediately stop a command at any time, just press Control + C on your computer’s keyboard.
6. id -un
The “id -un” command prints out the username of the user you are currently logged in as. “whoami” also works, but is obsolete and has been succeeded by “id -un“.
7. ping
The “ping” command sends a response request to a server hostname or IP address. It can help determine if a server is up and, if it is, what its response time is. For example, “ping example.com” would send a response request to the “example.com” server. If you see something like “64 bytes from 192.0.43.10: icmp_seq=0 ttl=246 time=25.208 ms“, then the server is up and has a response time of 25.208 milliseconds. If you see something like “Request timeout for icmp_seq 0“, then the server is down. To stop pinging the server, just press Control + C.
I hope you learned at least a few commands that you’ll find helpful. Again, make sure you read part 1 here if you haven’t already. Be on the lookout for part 3 in the near future!
















