inner-banner

Blog

Home Blog

Guide To Linux Commands

December 12, 2017 | Ajinkya Dube |

img

In my last blog, I listed git commands. In this blog, I will list out some very basic Linux commands.
Recommended version: Ubuntu 14.04
Pre-requisites: apt-get, nano editor

1. Start sudo session (root user)
> ~$ sudo su
> #

2. Install any software
>~$ sudo apt-get install <software/plugin>

3. Remove package
> ~$ sudo apt-get purge
or
> ~$ sudo apt-get --purge remove

4. Check versions
> php --version
> mysql --version
> apache2 -v

use either -v or --version

5. start a service/server
> service apache2 start
> service mysqld start
> service mongod start

6. Stop a service / server
> service apache stop

7. Get status of a service/server
> service apache status

8. Restart a service / server
> service apache restart

9. Edit file
> nano xyz.txt
> nano abc.conf
> nano /var/www/html/abc.txt
> nano <filepath>/<filename>
follow commands at the bottom for saving file

10. List files in directory
> ls
> ls -a
> ls -al

11. Create new directory
> mkdir

12. Remove file
> rm

13. Remove folder
> rm -rf

14. Copy file
> cp

15. Move file
> mv

16. Change Directory
> cd

17. Connect to secure server
> ssh @

In next tutorial, we will see all commands related to MySql and mongodb. Hope you found this helpful.

About the author

blog-author

Ajinkya Dube

Ajinkya is an S/W Developer with good experience and always ready for any complex code. He believes in smart work than rework.