Create Text File Using Nano | Automated Hands-on - CloudxLab

Upcoming Events

View all events ×
  • Login
  • Business Login

Login using Social Account

     Continue with Google

Login using your credentials

Enter email Enter password Remember me Log In! I understand and agree with the Terms of Use and Privacy Policy Toggle navigation CloudxLab Linux Basics > Sandeep Giri
    Sign In
Hide Playground Show Playground 23 / 107 Previous Index Next Create Text File Using Nano

You can use a text editor to edit or create a text file. There are many editors in Linux such as nano, pico, vi, emacs. Let's try to use nano for creating a file

  1. Launch nano to edit:

    nano myfirstfile.txt
  2. Type the following text into it:

    He walked into his exile
  3. Press Control+x, you will get a prompt at the bottom of the screen asking you to "Save modified buffer (Answering No will DESTROY CHANGES)". Press y as we want to save the changes, and then Enter to Save Changes and exit the nano editor.

  4. Alternatively you can create the file with this command

    echo "He walked into his exile" > ~/myfirstfile.txt

In case, you are stuck, please see this video:

INSTRUCTIONS
  • Use your home directory, type cd ~ to come to your home directory
Submit Answer Get Hint See Answer XP

XP

Taking you to the next exercise in seconds...

Stay here Next Exercise

Want to create exercises like this yourself? Click here.

Checking Please wait. Success Error Fetching hint, please wait... Error Fetching answer, please wait... Error

Note - Having trouble with the assessment engine? Follow the steps listed here

Previous Index Next

Loading comments...

CloudxLab Guided Projects

Subscribe to Cloudxlab to unlock your environment and get access to all our Subscription Courses along with it

Subscribe Now >>

Linux Basics

1 Linux Introduction

2 Linux is closer to?

3 Linux Overview

4 Linux Operating System

5 Linux Files & Processes

6 Number of processes

7 File Name on restarting

8 Process on Computer Restart

9 Process id

10 Linux Console

11 The Directory Structure

12 Relative and Absolute path

13 Relative File Names

14 Absolute and Relative Paths - 1

15 Absolute and Relative Paths - 2

16 Absolute and Relative Paths - 3

17 User manual of commands

18 Create Directory

19 Create Directory - nested

20 Create a directory when parent directory already exists

21 Delete a file

22 Create File

23 Create Text File Using Nano

24 Copy File

25 Use cases of cp command

26 Copy a file into another directory

27 Copy files of a particular extension

28 Copy a directory into another directory

29 Copy a directory along with files

30 Move Files & Directories

31 Use cases of mv command

32 Move a file to folder

33 Delete Files & Directories

34 Remove a directory

35 Seeing Inside File - cat, tail, head

36 Commands

37 Commands to print text of a file

38 Commands to print first few lines

39 Use find command

40 Searching files by name

41 Use find command to find files with .txt extension

42 Searching files by size

43 Extra functions of find command

44 Extra functions of find command exercise

45 Use grep command

46 Which line did you get in the result?

47 Use wc command

48 Check number of characters in a file

49 Permissions - Overview

50 List of files

51 Permissions: Assignment - Check owner and group of a file

52 Permissions - Using chmod To Change

53 Permissions: Assignment - Owner can change, others can only read

54 Permission: Assignment - Everyone can execute

55 Permission: Assignment - Nobody other than owner can read the file

56 Permission: Assignment - Only Group Members can read

57 Permissions - Numeric

58 Permissions: Numeric representation

59 Permissions - Advanced

60 Who can delete a file

61 Process

62 Which one is a process?

63 Find information about processes

64 BSD syntax of commands

65 Check ps command

66 Check all processes

67 Which command to use to monitor process?

68 Background Processes

69 Send a process in background

70 Kill a background process

71 Interacting with processes

72 More - Interacting with processes

73 Process hierarchy

74 Command to kill a process

75 Writing first shell script

76 Every Program Returns a Value

77 Value of echo $

78 Networking: Sockets and ports

79 Connecting to localhost

80 Files & Directories: linking

81 Hard link and soft link

82 Files & Directories - Symbolic links

83 Files & Directories - More About Symbolic Link

84 Hard link and soft link exercise

85 Readlink Command

86 Hard Link to a Directory

87 Chaining Unix Commands

88 Redirecting the output of a program

89 Pipes - Introduction

90 Pipes Exercise

91 Filters

92 Word Count Exercise

93 Improved Word Count Using Unix Commands

94 Word Count Exercise

95 Shell script for WordCount

96 Permissions of Processes

97 Read or Modify /etc/shadow

98 Permissions of Processes - setuid

99 Permissions - setting setuid

100 permissions of passwd file

101 Special System commands

102 Command to reboot the machine

103 Where is my program?

104 What is Hadoop command

105 Environment variables

106 Find value of an environment variable

107 Setting Environment variables

Close Index

Tag » How To Make A Nano