Ctrl + Z – Ubuntu Tricks

29/12/2020
Whenever you’re using a system, there are always one or more keyboard shortcuts. Essentially, these are functions and the keyboard button pressing sequence is the trigger. There are some of the pretty common key shortcuts like “Ctrl + C” to copy file(s) and/or content(s), “Ctrl + X” to cut and “Ctrl + V” to paste them. These keyboard shortcuts are so popular that every major system supports them and performs the same action.

How about “Ctrl + Z”? Like I said earlier, depending on the apps you’re using, this specific keyboard shortcut may mean different things. Today, let’s take a look on the functions of “Ctrl + Z” on Ubuntu.

The basic usage

It’s very common that we use “Ctrl + Z” for undoing any mistake we perform. For example, I want to type “I love Linux!” on the text editor.

Ouch! I mistyped “Linux”, right? What would you do in this scenario? Keep pressing backspace until the wrong word is removed? Wrong! Just press “Ctrl + Z”.

The function undo the last session of typing/actions you performed. In my case, the last thing I typed was “LInx” and so, it deleted the word from the text editor. Now, type what you truly feel –

It’s fine now! Well, that’s not where the basic usage of the keyboard shortcut ends.

Here is the screenshot of my test directory.

You can see that there are 3 files. If I delete any of them accidentally,

I can get it back by pressing “Ctrl + Z”.

Note that depending on your system, it may and may NOT work. That’s why before you completely DEPEND on this awesome trick, make sure that your system supports it in the scenarios you’re about to work on. Otherwise, disasters are bound to happen.

Ctrl + Z in the terminal

For every single Linux computer, the “Ctrl + Z” is the meaning of a complete different thing when you’re working on a terminal window. Let’s clear things with a demo.

Run the following command –

sudo pip install termdown

termdown 60

A process will start running while counting from 60 seconds to 0. Press “Ctrl + Z”.

Did the process die? Let’s find out. Run this command –

fg

The process is still alive! What the heck did just happen?

Here’s what “Ctrl + Z” does. It sends SIGSTP signal to the current foreground application. This effectively puts the program in the background. In English, it basically PAUSES the application. When you ran the “fg” command, it took the app from its frozen state into a living thing.

However, if you wanted to kill the program, you should have pressed “Ctrl + C”. It effectively KILLS the running process.

Got a grab on “Ctrl + Z”? Enjoy!

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

How to Install SQLite Browser 3.9.1 on Ubuntu

SQLite Browser is a GUI tool used for creating, designing as well as editing SQL database files compatible with SQLite....
12/02/2020

A Guide to Using PPA Repositiories in Ubuntu

One of the benefits of using Ubuntu is the wide availability of a range of third party repositories. These repositories...
29/12/2020

How to Install and Use Hyper Terminal on Ubuntu 18.04 LTS

Hyper is an electron-based terminal. It is written using web technologies such as HTML, CSS, JavaScript etc. It looks very...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Tìm Hiểu Về Thuê Proxy US – Lợi Ích và Cách Sử Dụng Hiệu Quả
11/12/2024

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024

Thuê mua IPv4 giá rẻ, tốc độ nhanh, uy tín #1
28/05/2024