How to open a file at fedora from terminal to write some codes in it?

I need to add some codes to a file that named local-kernel at fedora 36. How can i do that from terminal?

We need to know the exact file you are trying to change.

Barring that, a user can almost always edit a text file as root by using sudo and the editor of choice to open and edit the file.

This may or may not work depending upon the file and the distro you are using. It probably will not on fedora ostree based systems.

it called local-kernel bro look the article is this

and im trying to do that at there whats saying

" Add following lines to kernel-local file:

7 ```


how can i add the following lines to kernel local file its my problem

See this in my post above.

Bro what are you saying ı dont understand you speaking like, " yes, you are authorized to do this"

Im asking the way of this? Im asking the how can i add those codes > “CONFIG_ASHMEM=y

file that called “local-kernel” ?

You are talking about waydroid which I do not use.
Thus my instructions can only be generic.

You have not even told me where the file local-kernel may be located so I have no way to be more specific.

I not know where is the file called local-kernel bro. but do we need to know what directory the file is in to add some code? Can’t we open the file directly with a command like open local-kernel?

I am not your bro !
Familiar and informal terms such as this are frowned upon in forums such as this.
Once I overlooked. The second time is not acceptable.

You need to read the documentation and familiarize yourself with the app you are installing. You can not expect others to do the fine detail work for you.

Yes, you need to locate the file before you can edit it. If it does not exist then you need to know where it belongs before you can create it.

Alr sir i will not call you bro after this.

Im not installing a app sir.Im trying to paste some scripts into waydroid that will make enable to ARM support at Waydroid. “You can not expect others to do the fine detail work for you.” If I did not have such a purpose, I would not come here and write. I am writing here because I need help from those who know.

To edit a file, one needs to know the full path of the file, and then use an editor, any editor to open it and make changes.

So, if you’re using an editor, let’s say EDITOR, you’d go:

EDITOR <full path to file>

In your specific case, it says here:

that you need to run fedpkg clone -a kernel, this will create a new directory called kernel. So you need to enter this directory and then continue there.

As you can see here, this repository folder (which you are cloning) contains a file called kernel-local:

(not local-kernel).

You can also use an IDE like vscode or atom to edit the file. Any program that can edit code will work. If you’re using Gnome, it comes with gnome-editor or gedit. Search for “edit” in the activities search box.

If you’re not used to editing files in Linux etc., the blog you’re referring to may be a bit advanced for you. Please use your search engine before posting here—a lot of your queries will be common queries that will already have been answered. For example, searching for “edit file in Linux” gives lots and lots of blog posts:


Alr sir ı wrote “fedpkg clone -a kernel” command to the terminal. And its give me message that:

Klonlama konumu: 'kernel'...
remote: Enumerating objects: 7567, done.
remote: Counting objects: 100% (7567/7567), done.
remote: Compressing objects: 100% (5475/5475), done.
fetch-pack: unexpected disconnect while reading sideband packetn
fatal: erken dosya sonu (57826/92114), 58.11 MiB | 670.00 KiB/sn
fatal: fetch-pack: geçersiz index-pack çıktısı
Could not execute clone: Failed to execute command.

After this you are saying “So you need to enter this directory and then continue there.” So you are mean; after i entered the place you mentioned, i will paste the commands and my work will be done? If so how can i enter this directory? To the paste commands thats i shown you

I didnt undrestand what are you said sir

Looks like your “clone” command failed to complete due to a network error, so you will need to try again. Once it completes successfully, you can “enter” this directory via the command “cd kernel”. You can verify that the “kernel-local” file exists by listing the current directory’s contents with the command “ls”. At that point, as @ankursinha indicates, you’ll need to pick a text editor and then make your changes to that file. As mentioned, helping you to pick and use a text editor is beyond the scope of this forum, but you have the above suggestion on learning how to edit files in Linux.
Good luck, this may be tough if you have no experience using Linux command line tools and text editors.


You do not need to do this in fedora now.

Just install waydroid from copr. it will work fine. there is no need to compile kernels.


ARUN G So you’re saying that if I just download it from here without having to deal with codes, I’ll reach my purpose? just to explain my purpose. My goal is to play android games on fedora 36 system. And for this, I downloaded waydroid. However, there is no ARM support in waydroid, so games cannot be downloaded. And I heard that the way to enable arm support in waydroid is possible with a few scripts you can paste into waydroid. That’s why I am trying to implement what is said on this page. If I delete normal waydroid and download it from the link you gave, will ARM support be enabled on waydroid?

I don’t see anything related to adding arm64 translation on that page. That guide is for installing waydroid on older fedora, not about adding arm64 support to your waydroid images.


ARUN G but i asked the question at the this page, and a person said me as you can see i must follow that. ım confused now.

If you want to compile kernel with ashmem, I recommend reading generic kernel compilation guides in arch wiki to understand the basics.

1 Like

I don’t want to take the risk of trying to ashmem the kernel. thank you for helping sir xD