Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
1
answers
2450
views
How to run a web page with cache refresh using chromium-browser and command line?
I can start a web page with command line like that `cromium-browser http://some-page.com`. How can I start a web page with command line and with hard refresh cache option (equivalent of `CTRL-F5` if I tried to manually opened it with cromium)? I think there must be an argument option to do that but...
I can start a web page with command line like that
cromium-browser http://some-page.com
.
How can I start a web page with command line and with hard refresh cache option (equivalent of CTRL-F5
if I tried to manually opened it with cromium)? I think there must be an argument option to do that but I couldn't find it.
Mykhailo Seniutovych
(121 rep)
Oct 25, 2018, 06:03 AM
• Last activity: Jun 20, 2025, 02:07 PM
1
votes
1
answers
2974
views
Where are firefox cookies in Linux?
I want to find out where are firefox cookies getting stored in Linux. there is a similar old question [here][1] which says that the cookies are stored at `~.mozilla/firefox/ /cookies.sqlite` but i think this is not true anymore because i remove this file but i still have cookies in firefox itself. a...
I want to find out where are firefox cookies getting stored in Linux. there is a similar old question here which says that the cookies are stored at
~.mozilla/firefox//cookies.sqlite
but i think this is not true anymore because i remove this file but i still have cookies in firefox itself. also i tested the entire ~.mozilla/firefox
folder with inotifywait
using the following command:
$ inotifywait -mr .mozilla/firefox -e open -e access -e modify
and got nothing!. not even an access event occur when i open firefox and search or open any sites.
mНBr
(13 rep)
Jun 9, 2023, 10:15 AM
• Last activity: May 13, 2025, 03:39 PM
6
votes
2
answers
671
views
How do I get rid of the "accept cookies" prompt in Stack Exchange
Each time I go to Stack Exchange I get a "Accept Cookies" choice in the lower left corner. How can I set up my browser (Firefox) to automatically either accept the cookies, or automatically answer the question for me? I have tried Adblock Plus, and I also have uBlock installed. I was able to get the...
Each time I go to Stack Exchange I get a "Accept Cookies" choice in the lower left corner. How can I set up my browser (Firefox) to automatically either accept the cookies, or automatically answer the question for me?
I have tried Adblock Plus, and I also have uBlock installed. I was able to get the "sign in with google" prompt taken care of across websites using uBlock
||accounts.google.com/gsi/client$3p
in the My Filters tab.
Is there a solution like this for the cookies prompt in Stack Exchange?
Cool Javelin
(177 rep)
Apr 21, 2025, 11:08 PM
• Last activity: Apr 24, 2025, 11:53 AM
4
votes
2
answers
2302
views
How can you access the Chromium cookies on the command line?
I would like to get access to the Chromium cookies on the command line -- externally to chrome and without the use of any extensions. Where does Chromium store the cookies on disk? Is this possible and how would I go about doing it? I have an external utility that wants to authenticate with a cookie...
I would like to get access to the Chromium cookies on the command line -- externally to chrome and without the use of any extensions. Where does Chromium store the cookies on disk? Is this possible and how would I go about doing it?
I have an external utility that wants to authenticate with a cookie of a session that has already passed authentication. I do not want to have to keep opening up the Chromium Dev tools and finding it to copy-and-paste.
Evan Carroll
(34663 rep)
Sep 25, 2023, 06:27 PM
• Last activity: Apr 2, 2025, 04:03 PM
0
votes
1
answers
141
views
How to remove tii.la cookie in Linux?
I'm using Brave browser ver 1.56.20 in MX Linux 21.3 (Debian 11 based), how can I remove cookies in Brave? Tried to use remove icon, it does not work, seems it's a known bug in Brave (over a year old and not solved yet), installed BleachBit, did not work either (BleachBit forum is closed for new use...
I'm using Brave browser ver 1.56.20 in MX Linux 21.3 (Debian 11 based), how can I remove cookies in Brave? Tried to use remove icon, it does not work, seems it's a known bug in Brave (over a year old and not solved yet), installed BleachBit, did not work either (BleachBit forum is closed for new users), is there any other way to remove cookies installed by third party without your permission? Any other tools?
michaelbr
(111 rep)
Aug 16, 2023, 07:36 AM
• Last activity: Aug 16, 2023, 12:10 PM
0
votes
0
answers
755
views
`wget`: Cookies doesn't authenticate
I got some cookies from my browser where I'm well authenticated into a website. I've tried to give them to `wget` and make it download some internal pages, but all it downloads is authentication page ```sh wget --load-cookies $path/cookies.txt --show-progress --no-check-certificate -p -v -U '$userAg...
I got some cookies from my browser where I'm well authenticated into a website. I've tried to give them to
wget
and make it download some internal pages, but all it downloads is authentication page
wget --load-cookies $path/cookies.txt --show-progress --no-check-certificate -p -v -U '$userAgentString' https://$url
How to get the target page and not authentication page?
aac
(145 rep)
May 31, 2022, 07:58 AM
• Last activity: May 31, 2022, 02:07 PM
0
votes
1
answers
260
views
Is it possible to multiple login on the same server with wget?
The aim is to enter different accounts at the same time. With **lynx** this is possible using files for each account with the *-cfg=~/file* argument. **wget** has a *.wgetrc* file that can be configured with: cookies = on load_cookies = ~/cookies.txt save_cookies = ~/cookies.txt But unlike **lynx**...
The aim is to enter different accounts at the same time. With **lynx** this is possible using files for each account with the *-cfg=~/file* argument.
**wget** has a *.wgetrc* file that can be configured with:
cookies = on
load_cookies = ~/cookies.txt
save_cookies = ~/cookies.txt
But unlike **lynx** you don't have the option to invoke it with settings for multiple profiles, it simply loads when **wget** is started with a single cookie for the same server.
I use the script below that should create and maintain cookies without the need to have the *.wgetrc* file, but for some reason that I don't know **is only successful with *.wgetrc*.**
#!/bin/bash
LOGIN='login=Account&pass=12345678'
wget -qO- --save-cookies cookies.txt \
--keep-session-cookies \
--body-data="$LOGIN" \
--method=POST \
http://example.net/?sign_in=1
# after login
wget -qO- --load-cookies cookies.txt \
http://example.net/user
Based on this information I ask;
_Is **wget** capable of logging in from multiple accounts on the same server?
If yes, how?
***Lynx** is perfectly capable of doing this, but I didn't want to have to use it.*

Ueliton Alves Dos Santos
(13 rep)
Apr 23, 2022, 06:30 AM
• Last activity: Apr 23, 2022, 05:09 PM
1
votes
0
answers
3510
views
How to use curl to access a webpage behind a login form?
There is this webpage I'm trying to scrape but it is behind a login form that needs user/password. I used Firefox debug mode to find HTTP requests. Upon entering the credentials, there is a POST request which return a `set-cookie` in Response Headers. There is subsequent `GET` that uses this cookie...
There is this webpage I'm trying to scrape but it is behind a login form that needs user/password.
I used Firefox debug mode to find HTTP requests. Upon entering the credentials, there is a POST request which return a
set-cookie
in Response Headers. There is subsequent GET
that uses this cookie (instead of user/pass) to finally access the actual page. The cookie has an expiration date.
I assume I have to 1- get that cookie via curl POST dumping it in a cookie.txt
, 2- then again use curl GET with -b cookie.txt
option (**without** needing to pass along user/pass).
I want to fetch that set-cookie
via curl
in command line (step 1).
I tried to replicate what Firefox did with Copy as cURL
command on POST. It forms the curl request (with user/pass inside a --data-raw
switch and a short ASP.NET_SessionId
inside a -H 'Cookie: ...
.
Problem is, it does return a header but cookie is not there. The downloaded website (HTML) indicated something went wrong.
Now, in forming up the --data-raw
, there are fields like __VIEWSTATE
, __VIEWSTATEGENERATOR
and __EVENTVALIDATION
which seem to change on each GET
of the login page. I filled them up via a little scrpting. It didn't fix the issue.
I'm using the copied curl command from firefox alongside -c cookie.txt -D - -v
...It does not print the cookie in headers or dump the cookie in the file.
Zeta.Investigator
(1190 rep)
Aug 30, 2021, 05:19 PM
• Last activity: Aug 30, 2021, 05:48 PM
-1
votes
1
answers
1332
views
Can cookies be used to access an account like Instagram
Edit: Please don't downvote the post, I meant to click the Super User stackExchange when clicking the bookmark in my browser. Can cookies.txt obtained via 'Get cookies.txt' chrome extension when you're logged in be used to access your account.
Edit: Please don't downvote the post, I meant to click the Super User stackExchange when clicking the bookmark in my browser.
Can cookies.txt obtained via 'Get cookies.txt' chrome extension when you're logged in be used to access your account.
HBatalha
(109 rep)
Jul 16, 2021, 10:02 PM
• Last activity: Jul 16, 2021, 11:05 PM
0
votes
1
answers
2066
views
After logging in and downloading cookies using --cookie-jar, how do we use the downloaded cookies to access the page again?
I used the command below to download cookie using CURL in bash. How do I use this file (cookies.txt) to access the page? curl -u username --cookie cookies.txt --cookie-jar cookies.txt https://example.com
I used the command below to download cookie using CURL in bash. How do I use this file (cookies.txt) to access the page?
curl -u username --cookie cookies.txt --cookie-jar cookies.txt https://example.com
Koshur
(1399 rep)
Mar 21, 2017, 02:10 PM
• Last activity: Apr 1, 2021, 02:01 PM
2
votes
1
answers
2695
views
Difference between cURL's cookie-jar option and browser cookie?
I'm trying to login to a website using curl and HTTP requests. With the first http `GET` request I add `-c cookie.txt` to the command to save the cookie to a file. For the second curl POST I add `-b cookie.txt` to pass the same cookie again. Unfortunately I end up with a wrong session error message....
I'm trying to login to a website using curl and HTTP requests.
With the first http
GET
request I add -c cookie.txt
to the command to save the cookie to a file. For the second curl POST I add -b cookie.txt
to pass the same cookie again.
Unfortunately I end up with a wrong session error message. When I compare the POST request with Chrome's POST
request I see that the cookie has more data than what's in my cookie.txt. When I copy Chrome's POST
using "copy as cURL command" I get for the cookie:
-H 'Cookie: PHPSESSID=rrh5d7l69tgl8633g3hklea2e0; POPUPCHECK=1140804027760'
But my cookie.txt only contains the PHPSESSID
. What am I not seeing here? Thank you!
**Edit**
I added the verbosity flag to the two commands and received this output:
curl -v https://my.host.com --cookie-jar cookie.txt
GET / HTTP/1.1
> Host: my.host.com
> User-Agent: curl/7.54.0
> Accept: */*
>
POST / HTTP/1.1
> Host: my.host.com
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 73
>
* upload completely sent off: 73 out of 73 bytes
< HTTP/1.1 200 OK
< Date: Tue, 30 Oct 2018 09:39:06 GMT
< Server: Apache/2.2.22 (Debian)
* Added cookie PHPSESSID="lg9h4h8hlk69lrkosn0abpg7n7" for domain my.host.com, path /, expire 0
< Set-Cookie: PHPSESSID=lg9h4h8hlk69lrkosn0abpg7n7; path=/
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
* Replaced cookie PHPSESSID="r33haq0v45r4ofksrmm2ok86c5" for domain my.host.com, path /, expire 0
< Set-Cookie: PHPSESSID=r33haq0v45r4ofksrmm2ok86c5; path=/
< Vary: Accept-Encoding
< Content-Length: 3792
< Connection: close
< Content-Type: text/html; charset=utf-8
tzippy
(381 rep)
Oct 29, 2018, 03:35 PM
• Last activity: Sep 27, 2020, 05:00 PM
2
votes
1
answers
9949
views
What is the purpose of "use curl --cookie with a file that doesn't exist"?
From https://curl.haxx.se/docs/httpscripting.html > Curl's "cookie engine" gets enabled when you use the --cookie option. > **If you only want curl to understand received cookies**, use --cookie > with a file that doesn't exist. Example, if you want to let curl > understand cookies from a page and f...
From https://curl.haxx.se/docs/httpscripting.html
> Curl's "cookie engine" gets enabled when you use the --cookie option.
> **If you only want curl to understand received cookies**, use --cookie
> with a file that doesn't exist. Example, if you want to let curl
> understand cookies from a page and follow a location (and thus
> possibly send back cookies it received), you can invoke it like:
>
> curl --cookie nada --location http://www.example.com
What is the purpose of "use --cookie with a file that doesn't exist"?
What does "if you only want curl to understand received cookies" mean?
Thanks.
Tim
(106420 rep)
Jan 30, 2019, 05:33 PM
• Last activity: Apr 1, 2020, 04:21 PM
0
votes
1
answers
1023
views
How to save cookies when the app write to document.cookie?
I'd like to understand how to save cookies that the application writes to `document.cookie` (https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie), as I've noticed that the common methods wget/curl to save to a file does not work for this particular case, it seems. Assuming the web app w...
I'd like to understand how to save cookies that the application writes to
document.cookie
(https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie) , as I've noticed that the common methods wget/curl to save to a file does not work for this particular case, it seems.
Assuming the web app writes cookies:
document.cookie = name + "=" + value + expires + "; path=/";
For example,
wget --keep-session-cookies --save-cookies cookies.txt "http://foobar/app-generates-cookie.html "
or the curl,
curl --cookie-jar cookie.txt http://foobar/app-generates-cookie.html
Both wget/curl does not work for the app case above.
punkbit
(111 rep)
Oct 31, 2019, 10:49 PM
• Last activity: Nov 1, 2019, 12:36 AM
3
votes
0
answers
1138
views
How to accept cookie on the wkhtmltopdf command?
I am using the Linux command `wkhtmltopdf` to convert the HTML page to a PDF file for a report, but the page showing the cookie privacy note on the website which doesn't look good. To convert the `wkhtmltopdf`, seems the `--cookies-jar` is not a correct command to use. Please suggest any other way?...
I am using the Linux command
Command used:
$ wkhtmltopdf -O Landscape \
http://example.com/app/viewport.html#/overview/tabular/yearly data.pdf
wkhtmltopdf
to convert the HTML page to a PDF file for a report, but the page showing the cookie privacy note on the website which doesn't look good.
To convert the wkhtmltopdf
, seems the --cookies-jar
is not a correct command to use.
Please suggest any other way?

MohanBabu
(259 rep)
Aug 10, 2018, 07:23 AM
• Last activity: Aug 10, 2018, 09:57 AM
1
votes
0
answers
311
views
Use xdg-open to set cookie or post data
I use debian with gnome, and I often use `xdg-open` to launch my broswer on differents websites. I know `xdg-open` is intended to use system's default application for argument's registered purpose, be it open files, URLs, or any preferred application, but is there a way to tell xdg-open to tell my b...
I use debian with gnome, and I often use
xdg-open
to launch my broswer on differents websites.
I know xdg-open
is intended to use system's default application for argument's registered purpose, be it open files, URLs, or any preferred application, but is there a way to tell xdg-open to tell my broswer xdg-open 'https://example.com/ ' --cookie=/tmp/my/cookie
, or to change the verb used (use POST
, and add data to the body of the request) ? (Which would presuppose some unified ways to set cookie or post data crossbroswer, which I doubt but /meh)
Pierre-Antoine Guillaume
(333 rep)
Feb 9, 2018, 09:35 AM
2
votes
1
answers
22625
views
Get "Cookie" from https site by curl
I would like to have cookie of a HTTPS site. I do have credential and certificate to access given site. If I access site from chrome/firefox then I can easily extract cookie but what is the way to have this cookie from command line by using curl,wget or similar CUI-based tools ?
I would like to have cookie of a HTTPS site.
I do have credential and certificate to access given site.
If I access site from chrome/firefox then I can easily extract cookie but what is the way to have this cookie from command line by using curl,wget or similar CUI-based tools ?
SHW
(15376 rep)
May 4, 2017, 12:45 PM
• Last activity: May 4, 2017, 01:11 PM
1
votes
1
answers
4189
views
How to ignore the cookie path when using `cURL` request
I have two web-services 1. https://localhost/svc/auth which I call first with Authorization headers and I get a cookie 2. https://localhost/svc/catalog/1234 which I call by providing the cookie set by the 1st call I am trying to use cURL like this to get the catalog "1234": curl -u Username:Password...
I have two web-services
1. https://localhost/svc/auth which I call first with Authorization headers and I get a cookie
2. https://localhost/svc/catalog/1234 which I call by providing the cookie set by the 1st call
I am trying to use cURL like this to get the catalog "1234":
curl -u Username:Password -s -i -X GET 'http://localhost/svc/auth' -c /tmp/site-cookie.txt
curl -b /tmp/site-cookie.txt -s -i -X GET 'http://localhost/svc/article-stock/v1/car/CRH4203052?sid=esi&channel=str&site=0148'
But this does not work as it seems the cookie have the path set like this:
# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.
localhost FALSE /svc/auth FALSE 0 MYCOOKIE VXNlcm5hbWU6RU5DKFFva0VSaDdaMXpKTHRYRHJIUzlvaXVuakVpbURHYmsyaDFRUXlvclA4RD0p
I know I can ask the web-service developer to change the path in its cookie, but I wanted to know if cURL can ignore such path or not to save it?
рüффп
(1767 rep)
Dec 28, 2016, 09:53 PM
• Last activity: Dec 29, 2016, 06:07 PM
Showing page 1 of 17 total questions