We didn’t always have a nice-looking interface on our screen
In this article, we will learn how to work with a terminal on your laptop/pc. Note, this is a beginner's tutorial.
We didn’t always have a nice-looking interface on our screen where we could move the mouse around, click things to open or drag things to different locations, and so on. Early days of computers we used to send specific commands to our computer through a terminal and the computer would take this command read it and execute it accordingly.
In the IT world, we still use a terminal daily for different purposes. To begin, you will need to know and be able to use the basic commands:
- Navigation commands.
- Create and delete commands.
Navigation commands
All commands will be Linux-based. macOS users can use their regular terminal for windows users I suggest installing the GitBush terminal(install git, GitBush terminal is part of it).
pwd
will display the current location.ls
will list all files in the current location.cd <path>
will navigate to a specified path(used without <>).cd ..
will navigate one layer back in the file system hierarchy.
Create and delete commands
mkdir <directoryName>
will create a directory in the current location.touch <fileName>
will create a file in the current location.rm -rf <filePath>
will remove a file or a folder by a specified path. Note, it will not ask for confirmation and it will delete permanently. Be extremely careful while practicing.
Please take my Java Course for video lectures.This article is part of the series of articles to learn Java programming language from Tech Lead Academy:Introduction to programming
OS, File, and File System
Working with terminal
Welcome to Java Programming Language
Variables and Primitives in Java
Convert String to numeric data type
Input from the terminal in Java
Methods with Java
Java Math Operators and special operators
Conditional branching in Java
Switch statement in Java
Ternary operator in Java
Enum in Java
String class and its methods in Java
Loops in Java
Access modifiers in Java
Static keyword in Java
The final keyword in Java
Class and Object in Java
Object-Oriented Programming in Java
OOP: Encapsulation in Java
OOP: Inheritance in Java
OOP: Abstraction in Java
OOP: Polymorphism in Java
The method Overriding vs Overloading in Java
Array in Java
Data Structures with Java
Collection framework in Java
ArrayList in Java
Set in Java
Map in Java
Date and Time in Java
Exception in Java
How to work with files in Java
Design Patterns
Generics in Java
Multithreading in java
Annotations in Java
Reflection in Java
Reflection & Annotations - The Powerful Combination
Run terminal commands from Java
Lambda in Java
Unit Testing in Java
Big O Notation for coding interviews
Top Java coding interview questions for SDET