Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet196/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   192   193   194   195   196   197   198   199   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 144 
]
First, entering 
!!
 (two exclamation marks) in your terminal will repeat the command 
you last used. By itself, this may not seem like much. After all, you can press the up 
arrow key once and press 
Enter
 to recall the previous command and execute it. But, 
when paired with 
sudo

!!
 becomes more interesting. Imagine for a moment that you 
entered a command that needs 
root
 privileges, but you forgot to use 
sudo
. We've 
all made this mistake. In fact, as of the time I'm writing this chapter, I've been using 
Linux for 18 years and I 
still
 forget to use 
sudo
 from time to time. When we forget 
sudo
, we have to type the command all over again. Or, we can just do this:
sudo !!
And just like that, you prefixed the previously used command with 
sudo
 without 
having to completely retype it.
Speaking of avoiding unnecessary typing, a very easy (yet incredibly useful) feature 
is 
Tab Completion
. Often, the Bash shell will be able to automatically complete part 
of your commands. If you start typing a few characters of a command or path, press 
Tab
 on your keyboard, and if the characters you've typed are enough to narrow 
down the result, the shell will complete the path for you. You can also press 
Tab
 
twice in succession to see a list of possibilities that match the characters you've typed 
so far. Go ahead and give it a shot. By way of a quick example, you can type 
ls
 along 
with the path to your home directory, leaving some characters out on purpose. Then 
press 
Tab
, and see whether the command automatically completes. For example, I 
can type the following into the terminal:
ls /home/j
And after I press 
Tab
, it completes the command for me:
ls /home/jay
In addition, there are other special keyboard keys that will help you to navigate the 
command line quicker. Here's a table containing some of the most useful keyboard 
shortcuts:

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   192   193   194   195   196   197   198   199   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish