2 min to read
Linux tricks and tips for beginners
Beginner tips
Many of us use Linux, we mostly use Ubuntu which is beginner friendly with a good UI.
- We should use commands in linux to get the full taste and to enjoy it.
1. A small chat in Terminal:
When ever you are in a local connection, you might want a small session in terminal to connect with your friend, here comes nc
command.
To begin with, assume one member as host and the other as a client.
The host should start the connection with the below command.
nc -l 2222
- nc - netcat
- l - Listen for an incoming connection.
- 2222- A port number. You can use any port number, randomly try a 4 digit, if it fails saying it is in use try another..
The client should enter below command.
nc -l 192.168.102.73 2222
192.168.102.73
is the IP address of the host. Check the IP address of the host by typing ifconfig
command and finally enter the port number.
That’s it!! you are now connected. You can send the text messages..
If you want to terminate the session press CTRL + c
2. History clear:
History in Terminal is Handy thing, but for some users want to clear it. We can clear the history by
history -c
3. Manual or Help:
To get the manual or docs for a command
man nc
which ever command you want type it after man
.
4. sudo:
Sudo is a super user command used to passing the command as a super user.
sudo gedit test.py
5. Shutdown and Restart:
If you are a keyboard user here is a handy command for shutting down your computer and restarting it.
shutdown -P now
Here ‘now’ represents to quickly shutdown the system now it self, generally if you not mention it, it will be scheduled to shutdown after 1 min.
For restarting it use
reboot