Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet169/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   165   166   167   168   169   170   171   172   ...   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)

Editing with Nano
The 
nano
 editor, while more basic in terms of features, still has a fairly strong 
following. Actually, if you haven't already noticed, a person's choice of editor can 
actually be somewhat of a debate in the Linux community. To launch the 
nano
 
editor, it's as simple as running the 
nano
 command. If you don't provide 
nano
 with 
a filename, it simply starts with an empty window, as shown in the following 
screenshot:
Figure 5.1: The nano text editor, with no file selected


Managing Files and Directories
[
 122 
]
You can start typing right away, and when you want to save the file, you can simply 
press 
Ctrl
 + 
o
 to do so. On the bottom of the 
nano
 screen, you'll see an overview of 
shortcuts, including the method of saving the file I just mentioned (which it refers to 
as 
Write Out
). As you can see then, 
Ctrl
 + 
x
 is how you exit the editor and go back to 
the command line.
One trick that I love (which also works well with 
vim
) is pressing 
Ctrl
 + 
z
 when you 
have 
nano
 open, which will make it disappear. Actually, not really. That keyboard 
shortcut sends the current application inside the terminal to the background. 
Effectively, it's the same as minimizing it. You can bring the 
nano
 window back by 
executing 
fg
, which is short for 
foreground
. The ability to background and foreground 
an application in the terminal is part of process management, which is actually 
something we'll talk about in 
Chapter 7

Controlling and Managing Processes
, but we're 
giving you this tip ahead of time, to help you on your way! When it comes to editing 
files, sometimes it makes sense to send the editor to the background and bring it back 
later.
As you can probably guess, you can also use the 
nano
 command, with a target path 
and filename, to have the editor come up with a file already 
open. For example:
sudo nano /var/log/syslog
This command will result in the file opening in 
nano
:
Figure 5.2: The nano text editor, with the syslog file open


Chapter 5

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   165   166   167   168   169   170   171   172   ...   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